Hi there
First, if you do not have any typo in the code you put in, please put one
Option Explicit at the top of the code... Anyway, code:
Dim MyNewDoc As Object
Set MyNewDoc = CreateObject("Word.Basic")
MyNewDoc.AppShow
MyNewDoc.FileOpen Name:="c:\autoexec.bat"
worked just fine on my machine.
Notice that it is always "MyNewDoc ", not "MyNedDoc", "MyWordDoc", etc..
Regards
Daniel Balos, dipl.-Ing.
:I'm trying to use my VB5 application to open a Word 7.0 document and enter
:information from the VB5 application into Word. If someone could give me a
:clue how to start this... I'd be appreciative!
:
:Thanks
:
:NOTE:
:
:I've tried the following code (as a beginning), which opens Word with the
:document, but immediately closes it (for some reason):
:
: Dim MyNewDoc As Object
: Set MyNedDoc = CreateObject("Word.Basic")
: MyNewDoc.AppShow
: MyWordDoc.FileOpen Name:="c:\sample.doc"
:
:(c:\sample.doc is an existing doc)
:
: