WD: UseEnvFeeder Argument of ToolsCreateEnvelope FailsLast reviewed: July 31, 1997Article ID: Q168412 |
The information in this article applies to:
SYMPTOMSWhen you use the WordBasic ToolsCreateEnvelope statement to create an envelope, the UseEnvFeeder argument fails to change the tray for feeding envelopes. Using a setting greater than 1 causes the following error when you attempt to run the macro:
WordBasic Err=159: The value of one of the fields is too high. CAUSEAlthough UseEnvFeeder is a valid argument of the ToolsCreateEnvelope statement, it does not function correctly.
WORKAROUNDTo work around this problem use one of the following methods.
Method 1: Manually Set the Envelope Feed From SettingUse the following steps to manually set the Envelope Feed From tray from the Create Envelope dialog box:
Method 2: Use the SendKeys Statement to Set the Feed From SelectionWARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. If you need to switch between envelope feed trays you can use SendKey commands as shown in the following example WordBasic macro.
Sub MAIN FeedType$ = "e" ' The letter "e" will select ' Envelope Feeder. To specify ' any other method, use the first ' letter of the feed type. SendKeys "%te%o%f" + FeedType$ + "{Enter}{Enter}%p" ' %te - Opens the Envelopes And Labels dialog box. ' %o - Selects the Options button. ' %f - Selects the Feed From drop-down list. ' FeedType$ - Selects one of the options in the Form Feed list box. ' {Enter} - Sets the choice from the drop-down list. ' {Enter} - Closes the Envelope Options dialog box. ' %p - Prints the envelope. End SubThis macro will simulate the keystrokes required to change the envelope printing options and will print the envelope.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe WordBasic Help file states the following:
. UseEnvFeeder A number corresponding to the envelope source listed in the Feed From box: 0 (zero) corresponds to the first source, 1 to the second source, and so on.This feature does not work correctly. When printing envelopes using the ToolsCreateEnvelope command, Word defaults to using the last tray selected in the Create Envelopes dialog box, regardless of the setting used for the UseEnvFeeder property.
|
Additional query words: manual automatic feeding incorrect wrong
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |