• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 456
  • Last Modified:

Export Lotus Notes Documents into MS Word 2000

Programing Question:  I need a code for Lotus Notes Script that would take a selected already saved lotus document and export it over to MS Word 2000 (i don't know if the version matter).  I need the document to look simular to the form used to fill out the document... Meaning I will probably have to go in and set the Word format in the program. Can anyone help?  
  • 2
1 Solution
You could use the @Command([FileExport]) in an agent, rather than try to do this via Lotusscript.  

Alternately, you might want to setup a Word Document template that looks like the particular form you're exporting.  Then you can use VBA to just set the values of fields on the Word template.  
crystalsingletonAuthor Commented:
Do you mean use the VBA code in lotus notes to set the values?
Yes, here's a little code to get you started.  This isn't intended to be run, just to give you an idea what I'm talking about.  The following code in a Lotusscript agent could be used to get at a Word doc programmatically.  

    Dim vtWordApp As Variant
    Dim vtWordSelection As Variant
    Dim vtWordDoc As Variant
    'create document object
    Set vtWordApp = CreateObject("Word.Application")
    Set vtWordDoc = vtWordApp.Documents.Add("C:\template.dot")
    'Add variables
    Call vtWordDoc.Variables.Add ("date", "test")
    Call vtWordDoc.Variables.Add ("time", "test")
    Call vtWordDoc.Variables.Add ("location", "test")
    Call vtWordDoc.Variables.Add ("address", "test")
    Call vtWordDoc.Variables.Add ("phone", "test")
    Call vtWordDoc.Variables.Add ("email", "test")
    Call vtWordDoc.Fields.Update
    Call vtWordDoc.SaveAs("c:\HelloWorld2.doc")
    Call vtWordApp.Quit()
Sjef BosmanGroupware ConsultantCommented:
Works, but you'll never get the rich-text fields to Word in the same format. A cut&paste approach from an open document might work, but is still a Very Clumsy Method (says Pooh). If it's to be done only a few times, then use a manual cut&paste procedure.

For a proper solution, but only if you have a few $$ to spend, look into the Midas toolkit, on http://www.geniisoft.com
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now