see:
http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Vista Small Business, Office XP
The answer is buried in the text of the help topic, under the heading
"Declare the Object Variable":
"For example, assume that a new class module is created and called
EventClassModule."
If you created a new class module, by default it is named Class1, and
you have to either rename it (in the Properties pane) to
EventClassModule, or else change the module code to
Dim X As New Class1
to match the default name.
Bill Coan was more explicit about this step in his article at
http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm.
>I was looking in the help and it said the following:
>
[quoted text clipped - 11 lines]
>
>What am I doing wrong.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
LEU - 22 Nov 2007 02:19 GMT
Thanks all 3 of you for the information. I now know how this works. I made
the changes and it almost works . I am having problem with the autoexec macro
to get it to work, but I'll post it as a new question.
LEU
> The answer is buried in the text of the help topic, under the heading
> "Declare the Object Variable":
[quoted text clipped - 34 lines]
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Leu,
And the help says
"For example, assume that a new class module is created and called
EventClassModule. "
So "EventClassModule" is the class module name,
not a reserved word.
D-C Dave
>I was looking in the help and it said the following:
>
[quoted text clipped - 11 lines]
>
>What am I doing wrong.