|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
My VB program creates and prints graphical reports using Word Macros. The Print button works fine the first time you click it....but then, if you go for another printout the following error msg pops up:
"The remote server machine is unavailable or does not exist" Thinking this might be just another case of closing an object before opening again i 'set appword = nothing' at the end of each print run. This did not work. Does this server refer to the server of the createobject method...if so what can it be for Word macros I posted this on two other forums and for a week now...no replies. Can someone here help? Thanks a million |
|
#2
|
|||
|
|||
|
"The remote server machine is unavailable or does not exist" ----your print sevser is unavailable?? U use print server? Or in your code missing the appword.enddoc?..
![]() |
|
#3
|
|||
|
|||
|
Just guessing, it sounds to me like your vb code closes the Word OLE object the first time you run your program, so the word object is not there on subsequent runs.
|
|
#4
|
|||
|
|||
|
kalikaye! Please say more detail about your code..
|
|
#5
|
|||
|
|||
|
You will need to include appword (or whatever you named the word.Application object) before each time you refer to the document. (example: wApp.Selection.MoveDown Unit:=wdLine, Count:=7)
Hope this helps, BoomBoom |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > why wont my Word Macro run a second time in VB? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|