How to Wirte a "Word Automation" Report???????????

vijay_sr261982
Member Posts: 39
hai,
This is vijay from india. Can any one help me in , how to create Word Report using "Word Automation" like Excel. As i got an urgent "word report" from my client as a new requirement. Pls Help me..............

Urs,
Vijay
0
Comments
-
i would like to know also
plz help :shock:0 -
Word automation is not that difficult. Mailmerge is a whole different story.
I think you'll have to decide what you want to do.
For simple Word Automation://*** I use these variables: Name DataType Subtype Length wrdApp Automation 'Microsoft Word 11.0 Object Library'.Application wrdDoc Automation 'Microsoft Word 11.0 Object Library'.Document wrdSel Automation 'Microsoft Word 11.0 Object Library'.Selection wrdTable Automation 'Microsoft Word 11.0 Object Library'.Table wrdColumn Automation 'Microsoft Word 11.0 Object Library'.Column wrdRange Automation 'Microsoft Word 11.0 Object Library'.Range //*** Here is some code: //***** Init a word document IF ISCLEAR(wrdApp) THEN CREATE(wrdApp); wrdDoc := wrdApp.Documents.Add; wrdSel := wrdApp.Selection; //***** Insert Text wrdSel.TypeText(ptxtText); wrdSel.TypeParagraph; //***** Insert a Title wrdSel.Font.Bold := 1; wrdSel.Font.Underline := 1; wrdSel.TypeText(ptxtText); wrdSel.Font.Bold := 0; wrdSel.Font.Underline := 0; //***** Insert a table InsertTable(pintRows : Integer;pintCols : Integer) wrdRange := wrdSel.Range; wrdTable := wrdDoc.Tables.Add(wrdRange,pintRows,pintCols); . . .
If you just run a macro, record of what you want to accomplish in code, then view the code in VBA, then you can use this code in C/SIDE (converting to C/AL).
For Mailmerge:
I advise you to study codeunit 5054 thoroughly. You can learn many things of this codeunit.
I prefer the mailmerge-methodology, because this gives the opportunity to work with templates. If you want to use the simple method, then the design is changed "in code".0 -
Thanks for helping me in my urgency Mr . Eric :-({|=.......................0
-
Sorry wrong Them0
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