Help on creating PDFs and Auto emailing....

boywonder
boywonder Member Posts: 179
I have a solution using Dynamics NAV 5 with some PDF creating software which when printing a report will automatically email the report if the customer/vendor is set to communication type - 'Email'.

This works fine but the PDF creation software is chargeable and I'd like to move away from it.

Is there a simple way of getting any NAV report to go straight into Word 2007 sent with an email address so the user can view the document first and then only have to press Send?

Alternatively is there any free PDF software with built in API so I can pass commands to it and achieve this?

I've looked at the free package 'PDF Creator' which is good but I can't see anything about passing parameters otherwise this would be perfect as it is simply installed as a printer and has an Email button on the form that pops up so clearly it would be possible if the software allowed for the email address to be passed in as a parameter....

Any help on this will be MUCH appreciated :D

Comments

  • JPHSC
    JPHSC Member Posts: 67
    Whe use PDF Creator and use the SMTP mail codeunit ( 400) to mail it. You can try that?
  • boywonder
    boywonder Member Posts: 179
    many thanks for the quick reply :D

    unfortunately that wouldn't work as it would involve user intervention, the 'PDF Creator' box would still appear and they would have to choose a filename/location which the SMTP codeunit would need to find...

    I want something with no intervention at all.... :?
  • Reinhard
    Reinhard Member Posts: 249
    Not necessarily.
    PDFCreator you can set it to autosave the file.
    PDFCreatorOption.UseAutosave := 1;
    PDFCreatorOption.UseAutosaveDirectory := 1;
    PDFCreatorOption.AutosaveDirectory := fileDirectory;
    PDFCreatorOption.AutosaveFormat := 0;                       //PDF file, you can also save in other formats
    PDFCreatorOption.AutosaveFilename := fileName;
    
  • Savatage
    Savatage Member Posts: 7,142
    Have you checked out this post - it probably handles every question about pdf's
    viewtopic.php?f=5&t=18331

    **2000th Reference to this post =D>

    Or check out his Bullzip Pdf version
    http://mibuso.com/blogs/ara3n/2008/08/0 ... ts-to-pdf/
  • boywonder
    boywonder Member Posts: 179
    Reinhard wrote:
    Not necessarily.
    PDFCreator you can set it to autosave the file.
    PDFCreatorOption.UseAutosave := 1;
    PDFCreatorOption.UseAutosaveDirectory := 1;
    PDFCreatorOption.AutosaveDirectory := fileDirectory;
    PDFCreatorOption.AutosaveFormat := 0;                       //PDF file, you can also save in other formats
    PDFCreatorOption.AutosaveFilename := fileName;
    

    brilliant, thank you =D>

    sorry if you guys have seen this kind of thread 2000 times but I searched here and did not find..!
  • boywonder
    boywonder Member Posts: 179
    Ok just been told its an all Microsoft soluton that is required, so PDFcreator, XYZcreator etc all out the window now ](*,)

    So.....

    How can I automatically send a report (eg Statement) to Word 2007 then sending as a PDF in an email - so email address must be auto completed from Customer E-Mail field.

    The user just wants to press Print on the Report, nothing else.....

    I know (now) that NAV to PDF has been covered here many times but I don't think Word 2007 has come into it....apologies if it has but a search did not reveal it.....
  • DaveT
    DaveT Member Posts: 1,039
    boywonder wrote:
    Ok just been told its an all Microsoft soluton that is required, so PDFcreator, XYZcreator etc all out the window now ](*,)

    ....
    ...then sending as a PDF in an email

    PDF is not a Microsoft product :shock: - so how were you are you supposed to go from Word to PDF - use PDFcreator,etc...

    To see examples of exporting to word - look at the create interaction wizard.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • boywonder
    boywonder Member Posts: 179
    MS have a free download for Word 2007 that allows "Save As PDF" so that's what I'd need to tap into via Automation somehow...

    I'm told it's been done ...
  • DaveT
    DaveT Member Posts: 1,039
    Hi,

    Have a look at the code in Segment Line table and the codeunit WordManagement (this has code for merging and also examples of calling the word automation)
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • ara3n
    ara3n Member Posts: 9,258
    the user can also do an executable upgrade to 2009 and then you can write for your report the layout and be able to use the service tier to call
    Report.SAVEASPDF.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n