Link to home
Start Free TrialLog in
Avatar of kaiou
kaiou

asked on

Manage Word Session

Hallo..

I am working with a visual basic 6 application that open in a new word session width a document that i write...


This session is invisible..
The problem is: When an user open a new word document by doubleclick word use my session to open this... And closing this session, my application give me an error because server word does not exist...

It is possible lock my session only for me ???

HELP!!!

Thanks
Avatar of RichW
RichW
Flag of United States of America image

Can you show some code on how you are creating the Word object and how you are closing it?
ASKER CERTIFIED SOLUTION
Avatar of 2Angel
2Angel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kaiou
kaiou

ASKER

That is the code i use to open , close word session, and open a document:

in a class module (clsWD) i initialize application object

Public WithEvents wd As Word.Application

Private Sub Class_Initialize()
Set wd = New Word.Application
End Sub

Private Sub Class_Terminate()
wd.quit 0
Set wd=nothing
End Sub

When it is necessary i declare and initialize class.

dim objWD as clsWD

and unload with set objWD=nothing


Excuse me, but the problem is caused by user, that close the session word that i use, because it is not invisible.

I want open a word document with a new word session and not an already opened.