Advertisements

Converting Office Files into PDF from Navision

Today in this post i will walkthrough how we can convert any MS Office File into PDF.

It have been many time required to convert any attached file with the record in Navision to PDF format.

To perform this action we will require a tool which can be downloaded from:

OfficeToPDF download link :- http://officetopdf.codeplex.com/releases/view/118190

Extract and save the OfficeToPDF.exe file to some Folder.

For this Walkthrough i have created a Field in Customer Table to save the File Path of the Office File which we want to convert into PDF.

PDFConvMerge-1

You can add Dialog box to select the File from the specified Folder.

For this demo i have kept it simple Text Field where you can add your File Path and Office File Name. It is assumed that only Office File will be attached here.

For Setup purpose i have created one Setup Table & Page where we will store our other required Folder paths.

PDFConvMerge-2

Here we have given provision to save the Path of the Office to PDF Convertor Tool file Path & Temporay working Folder.

I have used the shared folder for all the paths so that it is not system specific, also make sure you give required permission on this folder for all the operating accounts.

Now our Next task will be to write a function which will perform this conversion part.

PDFConvMerge-3

Above Function Takes the File Name from the Customer Card we stored above on Customer Card. Takes the Path of the Office To PDF Convertor Utility and Tmp working Folder.

Prepares the PDF file Name along with Path stored in Setup.

Prepares the command to invoke Convert Utility using WsShell and returns the PDF file File Name along with path as defined in the Setup.

Now you can use this File for futher purpose as required.

To keep it simple no additional code of test and other required routine task is not added.

Now you know the Logic you can tweak the functionality as per your requirement.

I will comeup with more information in my up comming posts, till then keep exploring and learning.

 

Advertisements

Important

Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: