Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make window open in front after running Macro (MS WORD)

Status
Not open for further replies.

richiwatts

Technical User
Jun 21, 2002
180
GB
I have a Macro that works like a document wizard. When the wizard has finished it open up a template with all the fields from the wizard placed in it.

The problem is that the new document opens and I can see it in the task bar but it doesn't open on the screen straight away. I have to press the task bar once and then it minimises and then again to open it.

How to I make it open on top after the wizard has completed?

Many thanks
Richi
 
Windows("NewDocument.doc").Activate



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Sorry, I forgot to mention I am a total beginner

Where abouts should it go?

Richi
 
Enter it before the End Sub part of your macro. The NewDocumrnt.doc needs to be changed to the name of your file.

I hope this helps!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Thanks, but everytime I run the wizard it creates a new document. So, if I run the wizard 3 times it names them like ths:

document1.doc
document2.doc
document3.com

So how can I replace NewDocumrnt.doc with a file name? Or am I misunderstanding something. Sorry if I am...

Thanks
Richi
 
Thanks, but everytime I run the wizard it creates a new document. So, if I run the wizard 3 times it names them like ths:

document1.doc
document2.doc
document3.doc

So how can I replace NewDocumrnt.doc with a file name? Or am I misunderstanding something. Sorry if I am...

Thanks
Richi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top