Results 1 to 2 of 2

Thread: (VBA) running macros in background

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    49

    Question

    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.

  2. #2
    Addicted Member jeroenh's Avatar
    Join Date
    Aug 2000
    Location
    Rotterdam, Holland
    Posts
    201
    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.
    Catch you later,

    Jeroen Hoekemeijer
    Code:
    If 1 = 2 Then MajorError

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width