OpenNTF.org - Word Report Class
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Word Report Class 
Rating:
Not Rated Yet 
Contributor:
Christian Gorni 
Category:
Lotusscript 
Type:
OLE/ActiveX 
Document Release:
V1.0.0 
Notes Version:
R6.x 
Last Modified:
08 Nov 2005 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
After doing the Excel report, this is of course the next step. At the moment the class definition is very basic.


Feel free to add comments and ideas.

Usage / Example
The following methods are implemented:
--------------------------------------------------------
Sub new (xlFilename As String, isVisible As Boolean)
Sub Delete ()
Function writeTextToBookmark (NotesText as String, BookmarkName as String)
Function save ()
Function saveAs (filename as String)
Function quit ()
Function setVisibility (isVisible As Boolean)
Function getVersion () As String

Here is some example code:
---------------------------------------
Const WORDPATH = "C:\temp\TestWord.doc"

Dim session As New NotesSession
Dim db As NotesDatabase
Dim report As WordReport

Set db = session.CurrentDatabase
Set report = new WordReport (WORDPATH, false) ' false = don't show word

Messagebox report.getversion()

Call report.writeTextToBookmark("Bookmark1", "Hello world") ' bookmark must exist in word template
Call report.setVisibility(true)
Code Attachments
 Comments
Posted by Mark Teichmann on 11/09/2005 03:24:48 AMWhy not create project 'Office Exporter' ?
Many of us are using Word or Excel exports often. I think it is worth creating a new project for this exporting classes. There also export classes for the OpenDocument format could be included.
Posted by Stefan Johannsen on 11/22/2005 08:02:10 AMSupport serial letters
I have developed a similar library called MSOffice. The Word class is running super!
Try to support fields (MERGEFIELD) in word template files. Perhaps you try to support serial letters using external data sources (csv, xls, mdb, etc.).
 Add your comment!