office assistant code does not work anymore

G

Guy Cohen

Hi all
In the past this code worked - now it does not.
WHY? :)
I get rte 4601.
===========
Dim objOffice As Word.Application
Set objOffice = New Word.Application
objOffice.WindowState = wdWindowStateMinimize
Call objOffice.Activate
===========


TIA
Guy
 
T

Tony Jollans

I don't know why it might have worked before but I don't think you can
Activate - or, for that matter, Minimize - an invisible application. Add
this line:

objOffice.Visible = True

before setting the window state.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top