Rashed Amini

The ara3n weblog

Faxing Reports from Dynamics NAV

14th June 2009

I saw some question on mibuso forum on how to fax from Navision. This blog is about how to fax from Navision. This is method uses Microsoft Fax Services. You can use this to fax invoices etc to customers that prefer to receive Invoices by Fax. By default it is not installed and you need to install it. To install Fax Services, you need to open control Panel. Click on Add remove programs and click on Add/Remove Windows Components. Then tick Fax Services and click OK. It may ask for windows CD to install it.

After it is installed, make sure fax service is running in windows services. The code is fairly simple. Here is a screenshot

Notice in code that I am saving it as rtf file instead of html file. The FaxDoc automation issues a print command on the file and the default program that is associated it with suppose to open the file print it and then close. I found on the internet that there are issues with print html files. So by changing the ending of the file to rtf, windows opens MS Word and prints the file. MS word is smart enough to know that it’s a html file and it renders it correctly. If the default program that opens rtf file in your OS is different than word, you might want to try with html file and see if it works or try to save the file as PDF. In 2009 you can save it as excel on service tier so you can try to print excel as well. I tried to change the html file type to open with Microsoft word but no luck.
You can monitor the fax status in fax Console. You can open it from Start->Program files->Accessories->Comunications->Fax->Fax Console. Here is a screenshot.

Before sending fax from NAV you need to click on Tools->Configure Fax and select your modem and check enable Send.


Here is the object for this. FaxExample Happy faxing.

12 Responses to “Faxing Reports from Dynamics NAV”

  1. RH Says:

    Hi Rashed -

    Nifty posting - that’s a great outline of a quick way to automate faxing. The one problem is that especially for sending invoices (that include logos, special formatting, etc.) the HTML format usually doesn’t work the best. I created an add on to automate emailing and faxing of NAV reports as properly formatted documents (PDFs) - for anyone interested, info is available at www.altusbusinesssolutions.com.


  2. ara3n Says:

    I have already posted a how-to create PDF files for Nav reports. You can use that example with Faxing example and use PDF instead.

  3. ara3n Says:

    You can find the link on how to create pdf files in here.

  4. Elie Says:


    Great work… Thenka you so much

    I love you Man…. :-)


  5. Elie Says:

    One question:

    How can you send a cover sheet with your fax? I see there is a cover sheet property for FaxDoc but I couldn’t make it to work.
    Any ideas?


  6. ara3n Says:

    I haven’t tried but it would work the same way FaxDoc.body property would work.
    You just need another rtf file.

    FaxDoc.CoverPage := ‘C:\CoverPage.rtf’;

  7. Elie Says:

    I’ve already tried that but it did not work.
    Please let me know if you were able to print a coversheet.

    Thanks Rashed..

  8. ara3n Says:

    OK I tried it and this is how you get cover pages.
    Open the Fax Console and click on tools Personal Cover Pages. Create a new cover page and add what every you want. There are option to add the sender fax and address etc.
    Once you are done. Save the file. Change the code to the following and it will work.

    REPORT.SAVEASHTML(REPORT::”Top __ Customer List”, FileName ,TRUE);
    FaxDoc.Body := FileName;
    FaxDoc.CoverPageType := 1;
    FaxDoc.CoverPage := ‘C:\COVERPAGE.COV’;
    FaxDoc.DocumentName := ‘My Fax’;

  9. Elie Says:

    It worked.. Thank you..
    I knew the part about creating Personal Cover Pages, but I was missing the line of code: FaxDoc.CoverPageType := 1;
    I did not know what type to set it to…

    Thanks Rashed for all your help..


  10. ara3n Says:

    You are welcome.

  11. Med Says:

    please let us know what\’s the type of faxdoc automation of which library ?

  12. ara3n Says:

    FaxServer is of type ‘Microsoft Fax Service Extended COM Type Library’.FaxServer
    FaxDoc is of type ‘Microsoft Fax Service Extended COM Type Library’.FaxDocument

Leave a Reply

You must be logged in to post a comment.