Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Word Mailmerges & VB

360490Nov 18 2002
Hi,
I was not sure in which forum to post this ...
I am using VB6, Microsoft Word 2000 with an Oracle 8i database
I am trying to open a word document, and set the mailmerge information through VB :

Set mDoc = New clsMailMergeDoc
strDocFileName = "c:\test.dot"

Set mWordApp = New Word.Application
Set mWord = mWordApp.Documents.Open(strDocFileName, False, True)
strSQL = "Select * from table1 Where (id = 123)"
strConnection = "DRIVER={ORACLE ODBC DRIVER};SERVER=IFSCTEST;UID=BOREALIS;PWD=IF1234;DBQ=IFSCTEST;DBA=W;APA=T;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;PFC=10;TLO=O;"

mWord.MailMerge.OpenDataSource Name:="", Connection:= strconnection , SQLStatement:=strSQL
mWord.MailMerge.Execute

I get following error message :
"Command failed".

I tried the same using a DSN file, same error.
I do not know what I am doing wrong...
Thanks,
Cicile
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2002
Added on Nov 18 2002
2 comments
458 views