Emailing with pdfCreator

I’ve been trying to use the com interface to pdfCreator for several hours now and while I can easily print a pdf  file, I cannot get the emailing functionality to work reliably.  My need is to be able to either output to a pdf file for preview on the screen or to email it.  So far I can create the file and virtually every time I do so my Outlook email pops up with the file ready for emailing.  I didn’t tell it to do that and while it is one of my goals, I cannot control it.  I’ve got autosave on and setting SendEmailAfterAutoSaving seems not to make any difference.  The documentation for pdfCreator appears to be incomplete in the area of the com interface, so can anyone tell me how this can be made to work? 

 Using version 1.7.2 on Windows 7 64-bit

TIA…

Hi,


have you seen looked at the example in \PDFCreator\COM\Windows Scripting Host\VBScripts Testpage2PDFSendEmail ?

regards,

Robin


No I have not - when I looked for examples I didn’t see anything having to do with email but obviously missed something.  Thanks…

I did look at the vbscript example and attempted to use the sequence shown but that was worse than what I’ve been doing - I couldn’t find a way to turn the email off!  There doesn’t seem to be any documented explanation of the various pdfCreator and pdfCreatorOptions settings and how to use them anywhere that I’ve seen.  I’ve wasted so much time with this…

HI,

feel free to send us your script by email or post it here, we can have a look at it.
All settings have to saved with function cSaveOptions or the changes will have no effect.

regards,

Robin

Ok, but I’m writing in a different language than you are probably used to, Visual DataFlex.  The syntax below will be odd to you, every setting or method is prefaced with “Com” but you will see the familiar usage.  I took this sequence directly out of Testpage2PDF.vbs and I always get the email popping up.  I tried the disable message, which is commented out, but that made no difference. 

The pdf prints ok, but how do I turn off the email?

        Set ComUseAutosave of oPDFCreatorOptions to True
        Set ComUseAutosaveDirectory of oPDFCreatorOptions to True
        Set ComAutosaveDirectory of oPDFCreatorOptions to sPDFPath
        Set ComAutosaveFilename of oPDFCreatorOptions to (sFileName+".pdf")
        Set ComAutosaveFormat of oPDFCreatorOptions to 0
 
        Set ComCDefaultPrinter of oPDFCreator to “PDFCreator”
        Send ComCClearCache of oPDFCreator
//Set ComDisableEmail of oPDFCreatorOptions to True
        Get ComCOptions of oPDFCreator to vPDFCreatorOptions
        Send ComCSaveOptions of oPDFCreator vPDFCreatorOptions ""

One oddity I noticed is that every time I print SendEmailAfterAutoSaving is set to 1 even though I haven’t set it.  At first I thought that was what was causing the email dialog to popup but I tried setting that to false without any difference.

TIA…