How to print an external file using a codeunit in Navision.
On executing the codeunit, the location of the file should be fetched from
a table and the file should be printed.
Any ideas how to do this????
It depend of course on which type of files you want to print. If it is really mentioned as many types as possible, I suggest to use a viewer. I use for this reason RxView. With this viewer you can open many files (office, txt, bmp,jpeg,...,autocad,inventor,solidworks,...). If you buy (not for free) the activex, then you can build a program to open and print your file. This program can then be called from your codeunit. I use it in a simular way for a document management solution.
Only TXT file needs to be printed. We are attempting to send the file to a printer through code.Thinking of using the Automation server or OCX controls....
Comments
Consultant-Developper
http://www.CreaChain.com
copy file.txt >lpt1:
The > is the redirection sign, to move that file to the lpt1 port
You could try to use that command right out of navision.
Consultant-Developper
http://www.CreaChain.com
Let me see any thing else that can be done....
Thanks and Regards,
Jayakumar
Return := SHELL('notepad.exe /p C:\myFile.txt');
Thanks and Regards,
Nav_Dynamics