I am trying to create a word document pulling data from Excel and I am having some difficulty. I have used the following script to launch Word OK, but cannot get to my template file.
Private Sub Create_Bom_Click()
Dim myappid, ReturnValue
myappid = Shell("C:\Program Files\Microsoft Office2K\Office\winword.exe", 1)
So I turned to:-
Dim wdApp As Word.ApplicationwdApp.Documents.Open FileName:="C:\Temp\MyDoc.doc"wdApp.Visible = TruewdApp.WindowState = wdWindowStateMaximize
This created an error message of "type not defined" and stopped the whole works!
Assuming this is me and it easy to fix, can anyone tell me if I can also control Word's merge mail from Excel, or do I have to carry this out in Word and pull the data?
Hope you can help a frustrated user
DaveFish
Private Sub Create_Bom_Click()
Dim myappid, ReturnValue
myappid = Shell("C:\Program Files\Microsoft Office2K\Office\winword.exe", 1)
So I turned to:-
Dim wdApp As Word.ApplicationwdApp.Documents.Open FileName:="C:\Temp\MyDoc.doc"wdApp.Visible = TruewdApp.WindowState = wdWindowStateMaximize
This created an error message of "type not defined" and stopped the whole works!
Assuming this is me and it easy to fix, can anyone tell me if I can also control Word's merge mail from Excel, or do I have to carry this out in Word and pull the data?
Hope you can help a frustrated user
DaveFish