USE WORD EXE file one VB project
One more question ...Is it possible to open a word blank page when I click new from an menu bar of a VB project? Later on I can use this page for drawing My tree using a created VB toolbar.How popup window is created on VB.?It just lik when I click right button on specific shape I can edit the shap information like that.........
Refaul
Re: USE WORD EXE file one VB project
To open a blank new word document from VB 6 ...
VB Code:
Option Explicit
'Add a reference to MS Word xx.0 Object Library
Private Sub mnuFileNewWord_Click()
Dim oApp As Word.Application
Dim oDoc As Word.Document
Set oApp = New Word.Application
oApp.Visible = True
Set oDoc = oApp.Documents.Add
'Do more automated stuff to the document
'
'
'Close the document if you want and destroy the app object
oDoc.Close
Set oDoc = Nothing
oApp.Quit
Set oApp = Nothing
End Sub