I use word automation (WordXP) in my vb6 app
I want to open a datasource for my with MailMerge (i use this for my labels)
VB Code:
Appword.ActiveDocument.mailMerge.openDataSource Name:= FolderName & "\FormInvullen.mdb", SQLStatement:="select * from LayoutTable", ReadOnly:=True
I get error 'Word was unable to open the datasource'
But i know i have the correct Folderpath in FolderName var
and it can find the database FormInvullen.mdb
When i only give the databasename
VB Code:
Appword.ActiveDocument.mailMerge.openDataSource Name:= FolderName & "\FormInvullen.mdb"
then i get a window where i can choose the table (with name LayoutTable) from a list.
I allso tried leaving out the Readonly but now effect, what am i doing wrong it won't axcept my tablename for some reason.




Reply With Quote