Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 19th, 2007, 05:40 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error # 462 - Remote Server does not exist or is u

hello folks,
for some strange reason when I use the Word.Application code from MS Access to open word and then try to create a new document by using the Document.Add method it works only every other time. The first time it works but the 2nd time it doesn't. Then I try again and it works then I try again and it doesn't. Each time it doesn't work it gives the following error message: "Run-time error '462': The remote server machine does not exist or is unavailable."

Does anyone know how to make the remote server machine available so I can make this work properly every time? If I can't get this to work properly then I'll have to display an error message that tells the user there was a problem opening word and to please try again. That won't make the users very happy at all.

thanks in advance,
donrafeal

Reply With Quote
  #2 (permalink)  
Old December 19th, 2007, 09:47 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was wrong in how I explained it earlier. The first time I try it, it works then every time after that it doesn't work. The only way I can get it to work again is to shut down my application then reopen it and it works after that but only one time. So I can get it to work only once for each time I open it. Here is my code:


Dim AutText As AutoTextEntry
Dim oApp As Object

Set oApp = CreateObject("Word.Application")
oApp.Visible = True
oApp.Documents.Add [u]'This is where the error is thrown.</u>
DoEvents


I'm doing this from MS Access, not MS Word.


thanks,
Donrafeal

Reply With Quote
  #3 (permalink)  
Old January 17th, 2008, 07:15 AM
Registered User
 
Join Date: Jan 2008
Location: Norwich, Norfolk, United Kingdom.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to steeplesoft Send a message via Yahoo to steeplesoft
Default

I have a similar problem that occurs intermittently while trying to communicate between Access and Word. And, yes it does annoy my users, so if anyone can help I would be grateful. Am using Office XP

William Bradbeer
Reply With Quote
  #4 (permalink)  
Old January 17th, 2008, 08:04 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi Donrafeal

Does you loop the program quit/close the application at some time (I am not sure why it is working for first time)

Can you try early binding and check if the app is working

Code:
Sub Don()
Dim AutText As AutoTextEntry
Dim oApp As Word.Application ' Object

Set oApp = New Word.Application  'CreateObject("Word.Application")
oApp.Visible = True
oApp.Documents.Add 'This is where the error is thrown.
DoEvents
End Sub

http://www.dotnetdud.blogspot.com

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Remote server machine does not exist...' GandolftheWhite Excel VBA 7 September 13th, 2013 09:05 AM
Error 462 : Remote server doesn't exist ldk2004 BOOK: Expert One-on-One Access Application Development 0 December 17th, 2004 01:21 PM
'Remote server machine does not exist..." GandolftheWhite Pro VB Databases 0 November 15th, 2004 12:58 PM
Error:SQL Server does not exist or access denied. riga SQL Server ASP 2 June 11th, 2004 10:26 PM
Error Message: SQL Server does not exist or access brettdavis4 BOOK: ASP.NET Website Programming Problem-Design-Solution 6 August 3rd, 2003 06:31 AM



All times are GMT -4. The time now is 08:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.