I have always used the CreateObject("word.application") to call word
automatically from my applications but it doesn't seem to be working with
Word 2007.
My code is:-
Dim WordApp As Object
Dim WordDoc As Object
Dim WdRead As Boolean = False
WordApp = CreateObject("word.application")
WordDoc = WordApp.Documents.Open(Filename:=Chr(32) & "c:\documents
and settings\simon\my documents\fmspro_data\templates\1.dot" & Chr(32),
Readonly:=WdRead)
With WordDoc.mailmerge
.OpenDataSource(Name:="c:\documents and settings\simon\my
documents\fmspro_data\fmsmerge.csv")
.Execute()
End With
WordApp.Visible = True
An instance of Word is created but the document doesn't open and the
mailmerge fails. Does anyone know whats changed and if there is some code
that will work with Word 2000, 2003 and 2007 (if possible).
Thank you in advance.
Simon