Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

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 colcount
     colname=colnames
     SWAP "{":COLNAME:"}" with calculate(COLNAME) in doc
  next
  OsWrite doc on outfile
  Call 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:

At 13 AUG 2008 05:07PM John Bouley wrote:

Very interesting, thank you.

John

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/cc2356d8e0d918f2852574a30057d90a.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1