G
Gabriel RIvera
I have a question regarding what happens when the user
hits the "X" (on the top right hand of the Word Window)
to close a Word application. Using
dim wapp as new word.application()
It seems pretty clear that if the user clicks on the X
then the statement (wapp is nothing) should be true and
this is not the case.
*CODE*****
If Not (wapp Is Nothing) Then
If wapp.Documents.Count > 0 Then
Dim intResponse As Integer
If myDoc.Saved <> True Then
...more code
****end code*************
Programs execution executes the code inside the if
statement above and it crashes on wapp.documents.count>0
The Following error is thrown "the RPC server is
unavailable".
NOTE: Please note that my program initially opens a Word
application and types stuff into it. I then manually
close the Word Application (as any curious client might)
and then i run my program again which runs the code
snippet above. This crashing is what i am trying to avoid
and i am kinda' stuck cause i don't know what the X does
in the first place and why is wapp not null when the x is
pressed. THanks for the help.
Gabriel
hits the "X" (on the top right hand of the Word Window)
to close a Word application. Using
dim wapp as new word.application()
It seems pretty clear that if the user clicks on the X
then the statement (wapp is nothing) should be true and
this is not the case.
*CODE*****
If Not (wapp Is Nothing) Then
If wapp.Documents.Count > 0 Then
Dim intResponse As Integer
If myDoc.Saved <> True Then
...more code
****end code*************
Programs execution executes the code inside the if
statement above and it crashes on wapp.documents.count>0
The Following error is thrown "the RPC server is
unavailable".
NOTE: Please note that my program initially opens a Word
application and types stuff into it. I then manually
close the Word Application (as any curious client might)
and then i run my program again which runs the code
snippet above. This crashing is what i am trying to avoid
and i am kinda' stuck cause i don't know what the X does
in the first place and why is wapp not null when the x is
pressed. THanks for the help.
Gabriel