Macro to launch Lotus Notes email from Word 97

M

MIrving

1. I would like to write a code that:
a. In Word 97;
b. Launches Lotus Notes;
c. Creates a blank email;
d. Into which a standard subject line is written;
e. Into which a standard paragraph is written (in the body of the email); and
f. Does not attach the Word document to the email.

2. I have read http://word.mvps.org/faqs/interdev/SendMail.htm.

3. When I tried out the 'Using the Routing Slip method' example provided.
I got the following error ""Your Mail System Doesn't Support Certain Services
Needed for Document Routing".

4. I came across the following support site.
http://www-1.ibm.com/support/docview.wss?uid=swg21091976. If I read it
correctly, it might be saying that it is not possible to route Word 97 to
Lotus Notes?

Is there any other way I could achieve what I want to (or something similar)?

Thank you for any suggestions.
 
M

MIrving

Thank you Helmut. That is truly great - absolutely spot on! And, it was fun
to translate some of the note lines in the code using an online German
translator. Now it makes perfect sense. May I please ask you these further
questions:

1. I would like a 12pt paragraph return (ie. blank line) between paragraphs
of the email body text. I wrote this into the code, but I only get a
paragraph return (no height). How can I amend it to create the blank line:

objNotesMailDoc.Body = "Thank you for your e-mail ...." & vbCrLf & "Attached
is our reply...."

2. Is it possible to remove the horizontal line that appears at the end of
the email?

3. Is the code written on the basis that the recipient's address is saved
in the Lotus Notes address book? What if I want to send the email to an
address that is not already in the address book?

4. Is the code written on the basis that the email is automatically sent?
If so, how to I amend the code so that it doesn't send automatically, but
only creates the email.

Thank you very much for your further help.
 
M

MIrving

Sorry another question, if I may. The recipient's email address and the
subject line of the email will vary from document to document. However, the
Word document from which the NotesEmail macro is run has fields in it for the
user to first insert the email address and the subject line.

Therefore, is it possible to bookmark the email address and subject line in
the Word document and write into the NotesEmail code that the email address
and subject line in Lotus Notes be taken from the bookmarks? Or is there
another way I could achieve this?

Thank you kindly for any suggestions.
 
H

Helmut Weber

Hi MIrving,

so many questions I can't answer,
at least as far as it regards your first reply.

I don't know much about Lotus Notes,
in fact, I hate it, and its documentation is very poor.

I have to use Notes at work and kind of programmed it a bit
mostly by using the code from the source I gave you
whithout understanding much of what I was doing.

You might have to explore Lotus Script in addition,
very much like VBA, which doesn't make things easier,
as you never know where the differences are.
Sorry another question, if I may. The recipient's email address and the
subject line of the email will vary from document to document. However, the
Word document from which the NotesEmail macro is run has fields in it for the
user to first insert the email address and the subject line.

Therefore, is it possible to bookmark the email address and subject line in
the Word document and write into the NotesEmail code that the email address
and subject line in Lotus Notes be taken from the bookmarks? Or is there
another way I could achieve this?

You get the text from a field like that:
strEmpfaenger = activedocument.fields(1).result

You get the text from a bookmark like that:
strEmpfaenger = activedocument.bookmarks("Sendto").range.text

That is ordinary WordVBA.
If you got problems with that, start a new thread.
Some knowlegable people might not follow a thread about Lotus Notes.

HTH

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 
M

MIrving

Helmut - thank you very much for the code re: the bookmarks. That is working
perfectly.

The only thing I would now like to improve on if possible is to write the
code so that instead of opening a blank email, it opens an email with my
standard signature (my contact details). Usually in Lotus Notes, when I
click on 'New Memo' I automatically get my signature. Is it possible to
amend the following to achieve this:

' Opening the standard-mail data bank / construction new mail document
Call objNotesDB.OPENMAIL
Set objNotesMailDoc = objNotesDB.CREATEDOCUMENT
objNotesMailDoc.Form = "Memo"
Call objNotesMailDoc.Save(True, False)

Thank you for any suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top