Output Word document to PDF (OpenInsight 32-Bit)
At 12 AUG 2008 11:59:31AM John Bouley wrote:
I know you are wondering what the title has to do with OI.
Well I have a mailmerge utility that is capable to controlling Word 2003 through OLE, merging OI data and printing the results. The problem I am having is I would like to take the resulting document and save it as a PDF and attach it to an Email. So far I have only seen a couple of ways to accomplish this. First would be to purchase software from Adobe that would allow the printing or upgrade to Office 2007 and install the pdf addon from Microsoft.
Any ideas? Has anyone else done something similar?
Thanks,
John
At 12 AUG 2008 01:40PM Bob Carten wrote:
There are a bunch of PDF printers available. Google for PDF to Email, you will see some. Upgrading Word, using native features seems the simplest bet. With Office 2007 and a PDF printer you may even be able to skip the OLE automation, just use save your word template in XML format, put tokens such as {COLNAME} in place of fields, then use something like
osread template from templatefile else doc='
for i=1 to idcount
doc=template@record=Xlate(filename, ids[i], '', X')for j=1 to colcountcolname=colnamesSWAP "{":COLNAME:"}" with calculate(COLNAME) in docnextOsWrite doc on outfileCall ShellExecute("", "Print", outfile, "","",1)next
At 13 AUG 2008 11:19AM dsig _at_ sigafoos.org wrote:
You might also check out PDFCreator. This is a great opensource project from Sourceforge.
Works pretty sweet
At 13 AUG 2008 01:47PM John Bouley wrote:
Can you control the name of the resulting file using ole? I need to take a Word document convert it to pdf and attach it to an Email.
Thanks,
John
At 13 AUG 2008 02:45PM Warren Auyong wrote:
Looks like you can:
http://sourceforge.net/forum/forum.php?thread_id=1985645&forum_id=194223
At 13 AUG 2008 05:07PM John Bouley wrote:
Very interesting, thank you.
John