Automation question 
Author Message
 Automation question

Astrid,

Sorry, of course.  The exact error message is "The remote server machine
does not exist or is unavailable."

As to Bill Cohan's suggestion, that makes sense and I will give it a try.
I have manually closed the application between attempts, always with the
same result.  Does that differ from quitting the application
programmatically?

As always, thank you for your help.

Jim


Quote:
> Hi Jim,

> Can you post back with the *exact* text of the error you're getting? Is
any
> line highlighted when the error appears?

> Regards,
> Astrid (Microsoft Word MVP)

> For direct access to all Microsoft newsgroups:




Sat, 09 Nov 2002 03:00:00 GMT  
 Automation question
Hi Jim,

I tested your code on my Office 2000 system and I could reproduce the error.
I also found out what caused it. It's because you use a reference to
activedocument instead of objdoc.

objDoc.SaveAs "C:\My Documents\Jim's Documents\PLI Project\" &
ActiveDocument.Bookmarks(7).Range.Text & ", Letter" & ".doc"

If you change this to:
---------------------------------------
        objDoc.SaveAs "C:\My Documents\Jim's Documents\PLI Project\" &
objDoc.Bookmarks(7).Range.Text & ", Letter" & ".doc"
----------------------------------------
your code works like a charm!

I didn't test objWord.ActiveDocument, but I think this might work as well.
If you test it, please let us know the results.

BTW, quitting the object as Bill said, is a very good suggestion which I
would definitely built in your code.

Hope this helps,
regards,
Astrid (Microsoft Word MVP)

For direct access to all Microsoft newsgroups:



Quote:
> Astrid,

> Sorry, of course.  The exact error message is "The remote server machine
> does not exist or is unavailable."

> As to Bill Cohan's suggestion, that makes sense and I will give it a try.
> I have manually closed the application between attempts, always with the
> same result.  Does that differ from quitting the application
> programmatically?

> As always, thank you for your help.

> Jim



> > Hi Jim,

> > Can you post back with the *exact* text of the error you're getting? Is
> any
> > line highlighted when the error appears?

> > Regards,
> > Astrid (Microsoft Word MVP)

> > For direct access to all Microsoft newsgroups:




Sun, 10 Nov 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Office Automation Question - How to make office automation code version agnostic

2. Access to Word data automation question

3. Automation Question

4. Acc97: Word automation question

5. olMailItem and signature (automation question)

6. olMailItem and signature- automation question

7. Word Automation question

8. beginning automation question

9. C# and Word Automation Question....

10. Three VBA automation questions

11. Automation questions

12. OLE Automation question

 

 
Powered by phpBB® Forum Software