Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

How to close word server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ondrej - 16 Jan 2005 12:35 GMT
Hi everybody,

I am writing MS Access VBA application and I really don't know, hove to
close MS Word server, after all operations.

I start it in this way:
       Dim oApp As Object
       Set oApp = CreateObject("Word.Application")
       oApp.Visible = True

How to close it?

.. and sometime, when I close server by myself, it will not start again in
the future and I must to restart MS Access.
How can I detect, if server is already running?

Thanks a lot.

Ondrej
Jonathan West - 16 Jan 2005 13:09 GMT
> Hi everybody,
>
[quoted text clipped - 7 lines]
>
> How to close it?

oApp.Quit 0
Set oApp = Nothing

> .. and sometime, when I close server by myself, it will not start again in
> the future and I must to restart MS Access.
> How can I detect, if server is already running?

Try to access a running instance of Word using GetObject rather than
CreateObject. If that gives you an error, then try CreatObject. The
following article described more of this

Control Word from Excel
http://www.word.mvps.org/FAQs/InterDev/ControlWordFromXL.htm

The same code can be used from Access as from Excel.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Ondrej - 16 Jan 2005 13:28 GMT
Jonathan, thank you very much

Ondrej

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.