Insert data from Notes (.nsf) in a dialogbox in a template in Word

herch
herch used Ask the Experts™
on
Hi!
Can anabody help with some VBA-code, that I can use to insert data in a dialogbox in a Word template, and the data must come from a Notes-database (.nsf)
I am driving Office XP and Notes 5.
Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Just looking back through some old Q's...

Have you tried NotesSQL ODBC drivers or using Notes Automation Classes?

In VBA editor, Tools | References and checked Lotus Notes Automation Classes then you can access Notes databases as you would with LotusScript in Notes.  e.g. this simple VBA code will look at the local names.nsf and display a msgbox for each person in there, showing the full name and email address:

Let us know what you are after and I'll see if I can help (been developing for Notes since early 90's)

Steve

Sub ReadNAB()

Dim db As Object 'The mail database
Dim Session As Object 'The notes session
Dim view As Object
Dim doc As Object

'Start a session to notes
Set Session = CreateObject("Notes.NotesSession")

'Open Local names.nsf file.  first argument is Notes server
Set db = Session.GETDATABASE("", "names.nsf")

'Get hold of view named "people" in names.nsf
Set view = db.GETVIEW("People")

'Get first document in view
Set doc = view.GETFIRSTDOCUMENT

Do
   FullName = doc.GETITEMVALUE("FullName")
   Email = doc.GETITEMVALUE("MailAddress")
   MsgBox Email(0), , FullName(0)
   Set doc = view.GETNEXTDOCUMENT(doc)
Loop Until doc Is Nothing

End Sub

Author

Commented:
Thanks! it works fine, I can get the information,
but - my problem is, I have found the User.ID on the NT-workstation.
I have separatet the User-name, and then I will use the User to open a Notes user.nsf DB, where I can get all other data about the User.
The data must be send back and saved in a user.ini file on the NT-server.

Why do this? I use the data from the Ini-file to make lettes in Word, with all information about the user.
This looks like to be the quickest way to get the data to Word.
Do you have any iidea? Thanks in advance.
Herch
Hi herch,
There have been no comments to this question in 43 days, and it has been considered abandoned.
If this question isn't revived and no action is taken I will leave a recommendation in the Cleanup topic area that this question is:

RECOMMENDATION: Award points to dragon-it

Please leave any comments here within the next seven days since this will be finalized by a moderator that will use those comments to make the final decision.

-- PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER ! --

Paulo
Cleanup Volunteer
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial