How to open WORD from VBA?

Mackeral

Board Regular
Joined
Mar 7, 2015
Messages
173
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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Mackeral

Board Regular
Joined
Mar 7, 2015
Messages
173
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.
 

Forum statistics

Threads
1,136,278
Messages
5,674,807
Members
419,526
Latest member
ranjit446

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
Top