Sliently working with Word docs

J

Jonathan

Hi
I would like to silently work with a word doc file. i.e. - no messages
whatsoever will be displayed.

I open the doc using -
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
Word.Document oWordDoc = oWordApp.Documents.Open(...);
I've set the isVisible argument to false.

Yet, sometime the users gets messages directly from word - like when I'm
trying to save a read-only file. I want my application to handle those events
without any interference by the user.

Is that possible?

thanks!
 
C

Cindy Meister

With Word, no, this isn't 100% possible; the application simply wasn't
designed with this in mind. This is also why Microsoft doesn't recommend or
support automating Word in a Server environment.

By setting Application.DisplayAlerts you can minimize messages, but you
can't turn them off completely in Word. Beyond that, you need to develop your
application to check things that can trigger messages before executing. For
example, check whether the file is read-only before trying to save.
 
P

PaulK

Does this "Application.DisplayAlerts" have an equivalent in C++? Is the
"Printing" popup that comes up showing which page is being printed w/Cancel
button on it qualify as one of the alerts that could be turned off? I am
usingShellExecuteEx and hoping I can possible turn this particular popup off.

-- PaulK
 
S

sasha

PaulK said:
Does this "Application.DisplayAlerts" have an equivalent in C++? Is the

Of course.
"Printing" popup that comes up showing which page is being printed w/Cancel
button on it qualify as one of the alerts that could be turned off? I am
usingShellExecuteEx and hoping I can possible turn this particular popup off.

I don't think so.
 

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