Print an external file using a Codeunit???
NAV_Dynamics
Member Posts: 7
Hi Guys,
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????
Regards
NAV_Dynamics
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????
Regards
NAV_Dynamics
0
Comments
-
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.0
-
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....0
-
In DOS you can print a txt file very easily:
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.0 -
I am getting the Messaage the 'File is currently being Printed'. But it is not...
Let me see any thing else that can be done....
Thanks and Regards,
Jayakumar0 -
try this code:
Return := SHELL('notepad.exe /p C:\myFile.txt');0 -
This is working Fine.....
Thanks and Regards,
Nav_Dynamics0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions