How to open WORD from VBA?

Mackeral

Board Regular
Joined
Mar 7, 2015
Messages
232
Office Version
  1. 365
Platform
  1. Windows
Code:
VBA Code:
 On Error GoTo Doc_Open_Err
    Set Word_App = CreateObject("Word.Application")
    If Word_App Is Nothing Then
        MsgBox "Can't start Word.", vbExclamation
    Else
        Word_App.Documents.Open Full_Path_Name
        Word_App.Visible = True
    End If

"Full_Path_Name" is correct. I have very carefully checked that out.

Word_App = CreateObject("Word.Appliction") works.

When
"Word_App.Documents.Open Full_Path_Name"
executes, VBA starts "Running", and nothing I can do in Excel does anything to stop it.
I will get an message about Excel waiting for another process to complete (opening the file I guess).

When I look at Task Manager, I see that Word is running 2 processes.

If I "End" the Word process in Task Master, then Excel breaks with a debugging error.

Any idea what's going on or even better how to make it work.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
I found a post here in MrExcel titled

How to jump to top of word document's selected bookmark?​

that had code in it that showed me how to code my problem.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,734
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top