Word
Fri Sep 19 04:46:37 CDT 2003
G'day Sergio,
unfortunately Jez is a clueless beginner hack whose advice in this
case will lead you astray. Don't store anything in Normal.dot ever.
You can simply set those suggested variables in the document itself,
where it belongs, or the registry.
"Jezebel" <grocer@play.net> was spinning this yarn:
>There are several events that clear global variables while Word is running.
>The most common is doing anything in the VBE environment -- editing a macro
>for example. This resets the VBE 'project' which, amongst other things,
>clears all variables.
>
>Perhaps a better method for what you're trying to do would be to store the
>value in a non-volatile way: in the registry or as a CustomDocumentProperty,
>DocVariable, AutoText entry (etc) in normal.dot.
>
>
>"Sergio Crisalle" <Crisalle@hotmail.com> wrote in message
>news:42c601c37c5f$96f56db0$a501280a@phx.gbl...
>> I have an AutoExec macro that obtains the name of the
>> provider who will be using the terminal. The name is
>> stored in a public variable called "provider" and it is
>> entered into a note via other macros.
>>
>> Problem: after a few times the variable is applied to
>> documents and printed, the variable gets "empty" and no
>> longer keeps the provider's name.
>> I'm using Word 2002
>> Any help will be appreciated.
>>
>> Public Provider As String
>> Sub AutoExec()
>>
>> Provider = InputBox("Please enter your Name and title as
>> your signature", "Provider Identity")
>> Who = MsgBox("Please Click File, Open and Select by double
>> clicking your directory, " + Chr(10) + Chr(10)
>> + "corresponding to " + (Provider) + " then Cancel",
>> 48, "Find Your Directory")
>>
>> End Sub
>>
>
Steve Hudson
Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email steve@wordheretic.com
Products
http://www.geocities.com/word_heretic/products.html
Replies offlist may require payment.