>>I need to Save / PrintToFile a VFP-generated MSWord doc to a PDF file. I need to be able to specify the PDF filename. Cannot rely on the presence of certain versions of MSWord or MSOffice on the machine. Cant assume the user already has a PDF printer installed. Need to deploy functionality via an installer... which i'm sure is a pain in the arse with windows rights issues when attempting to install PDF printers via a setup process.
>>
>>Anyone doing something like this with GhostScript, cutePDF's SDK, etc... ? Thanks.
Sorry, missed this - finally had to close Firefox and then lost a few messages when I reloaded.
There's Print2PDF in downloads, which you can use as a starting point. It basically requires you to install a PostScript printer driver and GhostScript (both included, but you better get the latest GS). It was designed to work with frx reports, but it takes only a couple of hours or days to get it to work with Word - you basically need to tell Word to temporarily set the PS driver as default, then print into file, pass that .ps file to GS and let it convert to pdf. The main trouble will be the Word itself, because it may have near impossible settings (if you hide dialogs then other dialogs may pop up which otherwise wouldn't, it may complain about margins etc etc) and some of the code is different between W2003 and W2007... and then if your code saves the generated documents as .doc, they may be .docx inside if your user has installed W2007 without telling you etc etc.
How's VB these days?