It means just what it says. Your computer can't connect to \\Server\...
> Hello,
> I have 2 VBA procedures which create a Word document from 2 different
[quoted text clipped - 10 lines]
>
> Newbie
Newbie - 03 Nov 2006 10:54 GMT
Jezebel,
False : another procedure using the same syntax connects perfectly onto the
same server, on the same directory...
> It means just what it says. Your computer can't connect to \\Server\...
>
[quoted text clipped - 12 lines]
> >
> > Newbie
Hi Newbie,
> I have 2 VBA procedures which create a Word document from 2 different
> templates : Model1 or Model2, stored in the same directory:
[quoted text clipped - 5 lines]
> "Runtime error '462'. The remote server doesn't exist or is not available."
> What could be the cause of this error?
Often, this error means that a document variable you instantiated, to hold an
object, hasn't been released. Since it hasn't been released, when the VBA
code runs again, it can't re-use the object. Most often, this happens with an
object variable to which the application you're remoting is assigned.
Example:
Dim wdApp as Word.Application
Set wdApp = New Word.Application
'do things
End Sub
You'll notice that, in this code snippet you don't see
Set wdApp = Nothing
So the next time the code runs, there's a good chance the code will fail at
Set wdapp = New Word.Application.
Note that ANY "orphaned" pointer to an object could be causing the problem.
It could, for example, be wrdDoc in your code.
The next time you see the error, try closing the application in which your
code is running, then start it again. I'm betting the code will run the first
time after you re-start the application. Then you need to track down under
what particular set of circumstances this happens, follow that code branch,
and discover where the objects aren't being correctly released.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Newbie - 08 Nov 2006 22:56 GMT
Thanks a lot Cindy,
I'll work around that.
Newbie
> Hi Newbie,
>
[quoted text clipped - 41 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)