Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 19th, 2007, 05:40 AM
Registered User
 
Join Date: Aug 2007
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

 
Old December 19th, 2007, 09:47 AM
Registered User
 
Join Date: Aug 2007
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

 
Old January 17th, 2008, 07:15 AM
Registered User
 
Join Date: Jan 2008
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
 
Old January 17th, 2008, 08:04 AM
Friend of Wrox
 
Join Date: Sep 2005
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)





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.