Open DOC file

Michael Pettinicchi

Board Regular
Joined
Apr 11, 2002
Messages
53
I am trying to open a MS .DOC file from an Excel workbook but I get an error message: 424 - Object Required. I don't know what it means / what I need to do. My code is:

Application.ActivateMicrosoftApp xlMicrosoftWord
Documents.Open FileName:=FileNm, ConfirmConversions:=False, ReadOnly _
:=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate _
:="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="" _
, Format:=wdOpenFormatAuto

The open MS Word works ok. The problem comes whentring to open the file.

Thanks for your help.
Michael
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Does "FileNm" contain the name/fullpath of a file that exists?

If it doesn't then this would probably cause this error.
 
Upvote 0
error message: 424 - Object Required

this is an eror related to an object top link word and excel object are made, well thisis the simplist way see samples.xls for code, (should be installed when you installed office)

and so the codes wrong, suggest de bug and see wher it trips, my guess the objects or file locations, this on a LAN..

be careful what your PC sees is not the servers sights.

HTH
 
Upvote 0
Bergy,
Thanks for the reference tip but there are two problems with the solution:

1) I had to change
"Dim appWD As Word.Application"
to
"Dim appWD As Application"

2) It always opens a new Word Window weather or not Word is already open and wheather or not the DOC file is already open.

Anyway to avoid problem 2?

Thanks,
Michael
 
Upvote 0
Bergy,
Thanks for the reference tip but there are two problems with the solution:

1) I had to change
"Dim appWD As Word.Application"
to
"Dim appWD As Application"

2) It always opens a new Word Window weather or not Word is already open and wheather or not the DOC file is already open.

Anyway to avoid problem 2?

Thanks,
Michael
 
Upvote 0
Bergy,
CORRECTION to:
1) I had to change
"Dim appWD As Word.Application"
to
"Dim appWD As Application"

It should have read:
"I had to eliminate it."

Thanks,
Michael
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,293
Members
448,564
Latest member
ED38

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