How to use Microsoft word from C/SIDE

xrivo
Member Posts: 56
I want to work with Microsoft Word from navision...in fact I want to write a letter for some customers ... I have found an example in "Application Designer Guide" but is not working very good. Can you give me an example which realy works? Thx
0
Comments
-
Quick reply: look at Relationship Management, the Create Interaction function from the Contact card opens a Word document for some of the interaction types.
One tip: in Codeunit 5054 (WordManagement) change all CREATE(obj) to CREATE(obj,TRUE). This tells Navision to open a new instance of Word, even if there is already an instance open, otherwise you could get problems with older versions of Word.
AlastairAlastair Farrugia0 -
You can operate with formular fields, which need to be defined in the used template:
CREATE(wrdApp); TemplateName := '\\server1\templateshare\Navision\Customerletter.dot'; wrdApp.Visible := TRUE; IF NOT EXISTS(TemplateName) THEN ERROR (ErrMsgFileNotFound, TemplateName); wrdDoc := wrdApp.Documents.Add(TemplateName); wrdApp.ActiveDocument.Fields.Update; wrdRange := wrdApp.ActiveDocument.Fields.Item(1).Result; wrdRange.Text := kopfzeile; wrdRange := wrdApp.ActiveDocument.Fields.Item(2).Result; wrdRange.Text := Adr1;
You can alternatively use a book mark in your document (I hope M$ is using this translation for markers in the text, in German it's called "Textmarke":.... marker := 'marker1'; wdGotoBookmark := -1; what := wdGotoBookmark; // which := 1; // Standard = WdGotoFirst // count := 1; // Standard value wrdRange := wrdDoc.GoTo(what,which,count,marker); // set position wrdRange.InsertAfter(Customerno); // Insert data wrdRange.InsertParagraphAfter; // Insert paragraph
Have you ever tried to do OLE with OpenOffice ? \:D/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