Write to word not using automation

Polar
Member Posts: 32
You can write to Word not using automation.
1. Navision can write to file
2. You can use HTML
3. Word can open HTML files
Example
You can make a template CU with HTML header and footer and use it for making reports to word or beautiful invitation cards on your presentations
Using HTML you may not care of version of microsoft office.
Reports are much faster than if you use automation
And you will have more degrees of freedom
1. Navision can write to file
2. You can use HTML
3. Word can open HTML files
Example
FileMyHTML File OutStream1 OutStream Customer Record Customer function wr(t : Text[250]) OutStream1.WRITETEXT(t); FileMyHTML.CREATE('C:\main.doc'); FileMyHTML.TEXTMODE(TRUE); FileMyHTML.CREATEOUTSTREAM(OutStream1); wr('<HTML><HEAD> '); wr('<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=cp866"> '); // cp866 means DOS encoding , I had problem with cirillic wr('<META NAME="Generator" CONTENT="Microsoft Word 97"> '); wr('<TITLE>File Title </TITLE> '); wr('</HEAD><BODY> '); wr('<B><FONT FACE="Times New Roman" SIZE=4> '); wr('<P ALIGN="CENTER">Customers '+FORMAT(rec."No.")+' </P> '); wr('</B></FONT> '); wr('<OL> '); IF Customer.FIND('-') THEN REPEAT wr(' <LI>'+ FORMAT(Customer.Name)+'</LI>'); UNTIL CUSTOMER.NEXT = 0 wr('</OL> </BODY></HTML>'); FileMyHTML.CLOSE(); HYPERLINK('C:\main.doc');
You can make a template CU with HTML header and footer and use it for making reports to word or beautiful invitation cards on your presentations
Using HTML you may not care of version of microsoft office.
Reports are much faster than if you use automation
And you will have more degrees of freedom

keep it simple
0
Comments
-
How can I use your code sample to put something in the Word Header and Word Footer Section, example a picture logo and page number?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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