WD: ToolsCreateLabels Uses AutoText Entry Instead of LabelTextLast reviewed: February 3, 1998Article ID: Q123100 |
The information in this article applies to:
SYMPTOMSIf you use the LabelAutoText argument with the ToolsCreateLabels WordBasic statement, Microsoft Word ignores the LabelText argument and inserts the text of the specified AutoText entry instead. For example, the following statement inserts the ToolsCreateLabels1 AutoText entry specified by the LabelAutoText argument instead of the "123" string specified by the LabelText argument: ToolsCreateLabels .ExtractAddress = 0, .LabelListIndex = 0, .LabelIndex = 48, .LabelDotMatrix = 0, .LabelTray = 1, .PrintBarCode = 0, .SingleLabel = 0, .LabelRow = "1", .LabelColumn = "1", .AddToDocument, .LabelAutoText = "ToolsCreateLabels1", .LabelText = "123"
CAUSEWhen you include the LabelAutoText argument as part of a ToolsCreateLabels statement, Word always uses that argument, even if the statement also contains a LabelText value.
WORKAROUNDTo work around this problem, use either of the following methods.
Method 1: Use the LabelText Argument Only, Not the LabelAutoText ArgumentIf you want to specify the label text as part of the ToolsCreateLabels statement, use the .LabelText argument only and not the .LabelAutoText argument. For example, if you remove the LabelAutoText argument from the above macro, Word inserts the "123" LabelText argument as expected:
ToolsCreateLabels .ExtractAddress = 0, .LabelListIndex = 0, \ .LabelIndex = 48, .LabelDotMatrix = 0, .LabelTray = 1, \ .PrintBarCode = 0, .SingleLabel = 0, .LabelRow = "1", \ .LabelColumn = "1", .AddToDocument, .LabelText = "123" Method 2: Delete the AutoText EntryIf you want to leave the LabelAutoText argument in your macro, you can delete the AutoText entry (in the above macro, the AutoText entry is named ToolsCreateLabels1). When the macro cannot find the AutoText entry named in the LabelAutoText argument, it uses the LabelText value instead.
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.
|
Additional query words: macros Tools EnvelopesAndLabels
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |