0

/t5/coldfusion-discussions/creating-mail-merge-application-using-word/td-p/625295
Mar 22, 2007
Mar 22, 2007
Copy link to clipboard
Copied
Hi,
We are in the process in developing a coldfusion web application that enables user to upload Word document and a data source for mail merge.
After spending few hours googling, we are still unable to find a definite solution. Does anyone give us a pointer on how we might be able to achieve this? Can coldfusion maybe by using Java be able to access Microsoft's Office objects?
Your help will be truly appreciated.
We are in the process in developing a coldfusion web application that enables user to upload Word document and a data source for mail merge.
After spending few hours googling, we are still unable to find a definite solution. Does anyone give us a pointer on how we might be able to achieve this? Can coldfusion maybe by using Java be able to access Microsoft's Office objects?
Your help will be truly appreciated.
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Mar 23, 2007
Mar 23, 2007
Use the <cfobject> tag of coldfusion to create the
below objects of word application (you should have Microsoft word
installed in your cf server).
Word.Application
Word.Document
Word.MailMerge
Then you can follow the same steps how you do a VB program to create the Word MailMerge in ColdFusion. A sample vb code is give below,
Dim oWordApp As New Word.Application
Dim WrdDoc As Word.Document
Dim wrdMailMerge As Word.MailMerge
Set WrdDoc = oWordApp.Documents.Open("template path", ReadOnly:=True)...
Word.Application
Word.Document
Word.MailMerge
Then you can follow the same steps how you do a VB program to create the Word MailMerge in ColdFusion. A sample vb code is give below,
Dim oWordApp As New Word.Application
Dim WrdDoc As Word.Document
Dim wrdMailMerge As Word.MailMerge
Set WrdDoc = oWordApp.Documents.Open("template path", ReadOnly:=True)...

/t5/coldfusion-discussions/creating-mail-merge-application-using-word/m-p/625296#M58634
Mar 23, 2007
Mar 23, 2007
Copy link to clipboard
Copied
Use the <cfobject> tag of coldfusion to create the
below objects of word application (you should have Microsoft word
installed in your cf server).
Word.Application
Word.Document
Word.MailMerge
Then you can follow the same steps how you do a VB program to create the Word MailMerge in ColdFusion. A sample vb code is give below,
Dim oWordApp As New Word.Application
Dim WrdDoc As Word.Document
Dim wrdMailMerge As Word.MailMerge
Set WrdDoc = oWordApp.Documents.Open("template path", ReadOnly:=True)
Set wrdMailMerge = WrdDoc.MailMerge
wrdMailMerge.OpenDataSource Name:="file path", Format:="format", ConfirmConversions:=True
wrdMailMerge.Destination = wdSendToNewDocument
wrdMailMerge.Execute
oWordApp.ActiveDocument.SaveAs FileName:="full path & name", FileFormat:="format"
Set oWordApp = Nothing
Word.Application
Word.Document
Word.MailMerge
Then you can follow the same steps how you do a VB program to create the Word MailMerge in ColdFusion. A sample vb code is give below,
Dim oWordApp As New Word.Application
Dim WrdDoc As Word.Document
Dim wrdMailMerge As Word.MailMerge
Set WrdDoc = oWordApp.Documents.Open("template path", ReadOnly:=True)
Set wrdMailMerge = WrdDoc.MailMerge
wrdMailMerge.OpenDataSource Name:="file path", Format:="format", ConfirmConversions:=True
wrdMailMerge.Destination = wdSendToNewDocument
wrdMailMerge.Execute
oWordApp.ActiveDocument.SaveAs FileName:="full path & name", FileFormat:="format"
Set oWordApp = Nothing
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/coldfusion-discussions/creating-mail-merge-application-using-word/m-p/625297#M58635
Mar 25, 2007
Mar 25, 2007
Copy link to clipboard
Copied
Thanks for your help, I will try to implement your
suggestion.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

