OLE, VB5 and Word 7.0 
Author Message
 OLE, VB5 and Word 7.0

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)



Thu, 25 May 2000 03:00:00 GMT  
 OLE, VB5 and Word 7.0

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)
:
:



Mon, 29 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. OLE Automation VB5.0 and Word 7.0 for win95

2. OLE Automation Error Experienced with Word 7.0 not with Word 6.0

3. OLE Automation Error Experienced with Word 7.0 not with Word 6.0

4. OLE Automation Error experienced with Word 7.0 not with Word 6.0

5. VB5 HARD ONE:Locking Word OLE session to other Word Docs

6. HELP: Mail merge in VB5.0 between dbase III .dbf and Word 7.0 .doc

7. Word 7.0 and VB5

8. HELP: Mail merge in VB5.0 between dbase III .dbf and Word 7.0 .doc

9. OLE with VB5.0 to word/excel etc

10. How: Word OLE data type in VB5

11. VB5 OLE to Word '95 slow.

12. VB5 OLE -> Ms-Word 97 MailMerge

 

 
Powered by phpBB® Forum Software