Word 2004 error on MVP macro script

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Rudy Kohut (kohutr_at_connexus.net.au)
Date: 10/25/04


Date: Tue, 26 Oct 2004 09:12:08 +1000

I have been trying to get the following script to work in Word 2004 (V
11.1). It comes from the Word MVP site and the article is titled: "Enable a
user to double-click text in a document to change its value".

The script is:

 Sub SymbolCarousel()

 Select Case Selection.Fields(1).Code.Characters(29)
   Case "Y"
     Selection.Fields(1).Code.Characters(29) = "N"
   Case "N"
     Selection.Fields(1).Code.Characters(29) = "?"
   Case "?"
     Selection.Fields(1).Code.Characters(29) = "Y"
   Case Else
 End Select

 End Sub

When I run this in Word 2004 by double clicking on the field { MACROBUTTON
SymbolCarousel N}, I get a "compile" error message "sub or function not
defined" and the debugger opens with the word "Characters" (in the second
line with that word in it), highlighted.

Any help sorting out why this is happening would be appreciated.

Cheers

Rudy


Quantcast