-
I am using the VB Editor in Word97 to code a macro.
Is there any way I can hide the process of a macro when it is running? For example:
I have a macro that opens another document, finds all the occurences of the word "today" and changes them to "tomorrow" and then closes that document.
When this macro is run, I can SEE the new document being opened and the words replaced but I want this to be hidden from the user.
Any ideas on how I could do this?
Thanks in advance.
-
You could just use the code
Word.Application.Visible=False
at the beginning of your code and at the end you place
Word.Application.Visible=True
That way Word wil temporarly be invisible and you can't see the code working.
You could alse open an extra Session of word by using the following line in your procedure
Dim AppWord as New Word.Application
After that when you want to work with the new session of word just place the AppWord in font of it and you won't see it. Afterwards you can get your data form the Newly started session and place it in the old session where everything started.
Good Luck.