![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 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 |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Does "FileNm" contain the name/fullpath of a file that exists?
If it doesn't then this would probably cause this error. |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
I don't have an answer for you, but you might try doing a search. I found this earlier reference, hope it helps.
http://www.mrexcel.com/board/viewtop...c=2628&forum=2 |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
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
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Posts: 53
|
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 |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2002
Posts: 53
|
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 |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Apr 2002
Posts: 53
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|