Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 462

VBA Error 462: The Remote Server Machine Does Not Exist or Is Unavailable

10 min read Updated October 5, 2026 Outlook & Office Applications

Fix it now

Microsoft’s published cause for 462 is that a server was named and could not be reached or found. In practice the server is usually the copy of Word or Excel your own macro started, and it has gone away mid-run – because a call resolved against a different instance, or because something quit it early.

  1. Find the cross-application calls that name no object. In a macro running in Excel and driving Word, that means bare Documents, ActiveDocument and Selection; in a macro running in Word and driving Excel, bare Workbooks and ActiveSheet.
  2. Leave the host application’s own collections alone. In Word VBA, Documents and Selection are Word’s own and are perfectly safe; it is only the other application’s collections that need qualifying.
  3. Qualify each one against the variable you created: wdApp.Documents.Add rather than Documents.Add, and hold what you create – Set wdDoc = wdApp.Documents.Add – so you never have to reach for the active anything.
  4. Declare the objects properly. Dim wdApp As Object with Set wdApp = CreateObject(“Word.Application”) is the late-bound form; an early-bound declaration works too once the reference is set.
  5. Make the application visible while you debug with wdApp.Visible = True, so you can see what state it is really in.
  6. Check Task Manager for orphaned application processes left by earlier failed runs, and end them before you test again.
  7. Release in reverse order at the end: close the document, quit the application, then set each variable to Nothing.

Ending an orphaned Word or Excel process discards anything unsaved in it. Confirm it has no window and nobody is working in it before you end it.

If the macro runs twice in a row and leaves no process behind, you are done. The next section covers which application a reference resolves against and what the neighbouring codes actually mean.

Why it happens

Microsoft’s published cause for error 462 is short: CreateObject requires a valid server, a server parameter was specified, and the server could not be reached or found. On a network that reads as a remote machine problem. On a desktop it almost always means something much more ordinary – the automation server your macro created is no longer running, and the next call into it has nowhere to go.

The pattern that produces it most often is a call that names no object. Which application such a call resolves against depends on where the code is running, and that is the part that gets stated wrongly almost everywhere. In Word VBA, Documents, ActiveDocument and Selection are Word’s own globals: they resolve to the running host and there is nothing wrong with them. In Excel VBA the same is true of Workbooks and ActiveSheet. The candidates are the collections belonging to the application you are automating, not the one you are running inside – so from Excel, look for bare Documents and ActiveDocument; from Word, look for bare Workbooks and ActiveSheet.

Getting that the wrong way round matters. Selection.TypeText from inside Excel resolves against Excel’s own Selection, which has no TypeText method, so it raises 438 rather than 462. Chasing the wrong error through correct code wastes an afternoon.

The companions each have a published message and they are not interchangeable. 430 is “Class doesn’t support Automation”. 440 is the general “Automation error”. 445 is “Object doesn’t support this action”, and Microsoft’s stated cause is that you referenced a method or property the object does not support. 0x80010108 is RPC_E_DISCONNECTED, “The object invoked has disconnected from its clients”, which surfaces in VBA as run-time error -2147417848 (80010108), sometimes as 440, but not as 462.

Cross-application references are not qualified

You have this one if The code has lines that start with the other application’s collection name and no variable, and the failure is intermittent.

  1. Prefix every call to the automated application with the variable you created for it.
  2. Replace Selection and the active-object shortcuts with explicit document and range variables; Selection depends on interface state you do not control.
  3. Assign the document to its own variable at creation and use that everywhere afterwards.

The instance was closed before the code finished with it

You have this one if The error arrives late in a long procedure, or on the second run rather than the first.

  1. Move the Quit call to the very end, after every use of the instance.
  2. Check error handlers for cleanup that runs and then falls back into the main path.
  3. Look for a With block whose scope spans a Quit or a Close, and work invisibly unless you are debugging.

An orphaned instance is being reused

You have this one if It fails only on machines where earlier runs crashed, and Task Manager shows application processes with no window.

  1. End the orphaned processes before testing.
  2. Create your own instance rather than attaching to an existing one, so you start from a known state.
  3. Where you must attach, handle the case where no instance exists, and release references in reverse order of creation.

The object model does not match

You have this one if 430 or 440 on machines with a different Office version, or straight after an upgrade.

  1. Check Tools > References in the Visual Basic editor for entries marked MISSING.
  2. For code that must run across several versions, use late binding with CreateObject and declare variables As Object.
  3. Replace version-specific constants with their numeric values when you switch to late binding.
  4. If you get 445 rather than 430, check the member name: it means the object does not support that action at all.

The automation is running somewhere it should not

You have this one if It works interactively and fails from a scheduled task, a service, a web application or a server-side job.

  1. Recognise that driving the Office desktop applications from a service or an unattended process is not a supported design.
  2. Replace the automation with a library that reads and writes the file formats directly, which needs no application instance.
  3. If the work genuinely needs the application, run it in a logged-on interactive session.
  4. Log around every automation call so an unattended failure can be diagnosed.

Full reference

Qualified and unqualified, side by side

' In Excel VBA, driving Word. Fails: the collection belongs to Word,
' and nothing here says which Word.
Set wdApp = CreateObject("Word.Application")
Documents.Add
ActiveDocument.Content.InsertAfter "Hello"

' Correct: every call is qualified and every object is held
Dim wdApp As Object, wdDoc As Object
Set wdApp = CreateObject("Word.Application")
Set wdDoc = wdApp.Documents.Add
wdDoc.Content.InsertAfter "Hello"
wdDoc.SaveAs2 "C:\Temp\out.docx"
wdDoc.Close
wdApp.Quit
Set wdDoc = Nothing
Set wdApp = Nothing

Which names to look for, by host

Code runs in Automating Unqualified names to hunt Names that are fine
Excel Word Documents, ActiveDocument, Selection Workbooks, ActiveSheet, Range
Word Excel Workbooks, ActiveSheet, Cells Documents, ActiveDocument, Selection
Access Excel or Word Workbooks, Documents, ActiveDocument CurrentDb, Forms, Reports
Outlook Excel or Word Workbooks, Documents Application.Session, Explorers

Telling the automation errors apart

Code Published message What to do about it
462 The remote server machine does not exist or is unavailable The server named cannot be reached or found. On a desktop, find out what happened to the instance you created
430 Class doesn’t support Automation The component is not an automation server, or the registration is wrong
440 Automation error The server returned a failure the client could not map to anything more specific
445 Object doesn’t support this action You called a method or property the object does not expose. Check the spelling and the object’s documentation
0x80010108 The object invoked has disconnected from its clients Surfaces as run-time error -2147417848 (80010108), sometimes 440. Not 462, though the cause is usually the same

445 is worth dwelling on because it is so often misread as a state problem. Microsoft’s cause is that the method or property is not supported by the object, and the remedy is to check the spelling and read what the object actually exposes. It turns up most often in code written against one Office version calling a member that a different version does not have, which is the same territory as 430 but a different question.

Early binding, late binding, and when to switch

  • Early binding gives compile-time checking and autocomplete, which makes development much faster.
  • Late binding survives version differences across machines, because nothing is fixed at compile time.
  • A common approach is to develop with early binding and switch to late binding before distributing.
  • If you switch, replace every named constant with its numeric value, because the constants come from the reference you have just removed.

Cleaning up properly

Close documents before quitting the application, quit the application before releasing the variable, and release variables in the reverse of the order you created them. Put that sequence in one place that runs whether the procedure succeeded or failed, rather than repeating it down several error paths. Most orphaned processes are not caused by a crash; they are caused by an error handler that skipped the cleanup and a variable that went out of scope with the application still running.

Every code this article covers

Code What it points at Source
462 The remote server machine does not exist or is unavailable: a server was named and could not be reached or found Microsoft Learn
430 Class doesn’t support Automation Microsoft Learn
440 Automation error: a failure returned by the server that the client could not map to anything more specific Microsoft Learn
445 Object doesn’t support this action: you referenced a method or property the object does not support Microsoft Learn
0x80010108 RPC_E_DISCONNECTED, the object invoked has disconnected from its clients. In VBA it surfaces as run-time error -2147417848 (80010108), not as 462 Microsoft Learn

Confirm the fix worked

  1. Run the macro twice in succession and confirm the second run behaves like the first.
  2. Check Task Manager afterwards and confirm no application process is left behind.
  3. Search the project for the other application’s collection names with no variable in front of them, and confirm none remain.
  4. Run it once with the automated application visible, and watch it open, do the work and close.
  5. Test on a machine with a different Office version if the code is distributed, to confirm the binding choice holds.

Questions people ask about this

Do I need to buy anything to fix this?

No. This costs nothing, because it is a coding pattern rather than a licensing problem. The only licensing question nearby is whether the machine running the macro is properly licensed for the application being automated, which it must be.

Why does it fail only sometimes?

Because it depends on which instance a given line resolved against and whether that instance is still alive. Timing, user actions and leftover processes all change the outcome, which is exactly why unqualified cross-application references are so hard to pin down.

Is Selection always a problem?

No, and this is where a lot of advice goes wrong. In Word VBA, Selection is Word’s own and is fine. It is only a problem when the code is running somewhere else and Selection is meant to mean the automated application’s selection – from Excel, for instance, where it will resolve to Excel’s own and raise 438 rather than 462.

Is 0x80010108 the same as error 462?

No. 0x80010108 is RPC_E_DISCONNECTED, and in VBA it appears as run-time error -2147417848 (80010108), sometimes as 440. The underlying situation – the automation server has gone – is usually the same, but they are different errors and the message you see tells you which one you have.

Can I run this on a server overnight?

Not with the desktop applications. Driving them from an unattended process is unsupported and produces exactly these errors. Use a library that manipulates the file formats directly, or run the job in a logged-on interactive session.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix VSTO Add-in Crash 0xe0434352: .NET Exception Kills Outlook, Word or Excel Free Fix OneNote Sync Errors 0xE0000007 and 0xE4020045: Notebook Will Not Sync to the Cloud Free Fix Word could not create the work file: Fix a Broken Temp Path and Cache Location Free Fix Cannot Start Microsoft Outlook: The Set of Folders Cannot Be Opened
โ† Back to Knowledge Base