Microsoft KB Archive/63935

Using Quotation Marks as Text in a Word 4.00 or 5.00 Macro

PSS ID Number: Q63935 Article last modified on 11-02-1994

4.00 5.00

MS-DOS

= SUMMARY =

A single quotation mark in a macro is represented by four quotation marks. For example:

<>

This expression sets a variable called var1 equal to a single quotation mark. If the variable is called from within a macro, it will produce the following:

&quot; (a single quotation mark)

= MORE INFORMATION =

The following shows examples of text and the associated macro statement which assigns a variable equal to that text:

Text Macro Statement —- —————

&quot; <>”&quot; <>”Test&quot; <>”Word&quot;“5.00” <> Word Test <>

The format for representing a character as a variable in Word 4.00 and 5.00 is “L”. For special characters, such as a question mark, use “^?”. In the case of quotation marks, &quot;&quot;&quot; and “^”&quot; are not valid. An error message occurs for any odd number of quotation mark characters.

The following is the error message for Word 4.00:

Unbalanced quotes or parenthesis, macro aborted.

The following is the error message for Word 5.00:

Unexpected end of macro, macro aborted after…

Note: A &quot;&quot; is defined as an end-of-file marker or null character.

Information on Word version 4.00 macros can be found in Chapter 22 (Pages 321-352) of the “Using Microsoft Word” manual.

Information on Word version 5.00 macros can be found in Chapter 24 (Pages 429-483) of the “Using Microsoft Word”manual.

Specific information on text, number, date, and variable name expressions is on Page 450 under “Elements Used in Macro Instruction Statements.”

KBCategory: kbother kbmacro KBSubcategory: Additional reference words: ============================================================================= Copyright Microsoft Corporation 1994.