Unique Lotus Notes code

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

Try first creating a report that pulls all the information
you want from your form. Then using the following command:

DoCmd.SendObject acReport, "Your ReportName Goes
Here", "HTML(*.html)",emailaddress, "", "", "Subject", "",
False, ""

The emailaddress variable is a variant in my code. This
allows the value to be null in case I do not have an e-
mail address for a individual. You can also hardcode this
address if you want. Just put it in quotes in the command.
I also use Lotus Notes and this works as expected. You may
have to have Lotus open at the time you execute the code.
I currently use Notes v6. With v5, for some reason I do
not understand, I had to have lotus open before I executed
this code.

I hope this helps!

Kevin
 
I need to make it simple for users to process. Basically I
want them to type the info into the record and when they
are done, click a button I'll call "Email Record". I need
the button to perform this for every record they touch, so
I don't think the report option will work since they won't
have rights to create a report. Any thoughts or code ideas?
-----Original Message-----
Try first creating a report that pulls all the information
you want from your form. Then using the following command:

DoCmd.SendObject acReport, "Your ReportName Goes
Here", "HTML
(*.html)",emailaddress, "", "", "Subject", "",
 
Give me more details.

Basically, the concept is for you to create a report to
pull all appropriate information together and output that
to Lotus. Base your report on a query or set of queries
that pulls the information together and sends it, through
that report to Lotus. The report would be the final
output to lotus.

Kevin
 
I'll put the report together. Once I have that done, what
coding will I need to use for the button, so that it pulls
the info and generates the letter in Lotus, rather than
Outlook.
 
If you have both Outlook and Lotus on the machine, I am
not sure but I suspect you will need to have lotus open
(and outlook closed) to make this work. Also, if you don't
need Outlook, delete it from the computer. The command is
as follows:

DoCmd.SendObject [objecttype][, objectname][, outputformat]
[, to][, cc][, bcc][, subject][, messagetext][,
editmessage][, templatefile]

check help for the SendObject command for more details.
This will send the report in a similar manner as opening
it for preview or printing, the only difference is the
report text will be inserted into the E-Mail.

One of my applications has the following command:

DoCmd.SendObject acReport, "MyReportNamehere", "HTML
(*.html)",emailaddress, "", "", "MyMessageSubjectHere",
"",False, "".

emailaddress is a variant variable in my code. I send the
report to various people depending on several conditions.
I use this to build the E-Mail address string depending on
the conditions. You must build the string here just like
it would be assembled in Lotus. Lotus uses commas, so if
you have several people to whom your sending the
information it would look something like this when it is
complete:

emailaddress="person1@?.com, person2@?.com", etc.

The above command (sendObject)then will insert the final
string into your e-mail when it is created.

One last thing, I know there is a way to open an outside
program from within VBA, I am just not familiar with it.
You can start Lotus if it's not already active. If you do
this, I would think you'll also have to check to see if
the application is running before instantiating it again.

Good luck! I hope I have helped!

Kevin
 
Thanks. I'll give it a shot.
-----Original Message-----
If you have both Outlook and Lotus on the machine, I am
not sure but I suspect you will need to have lotus open
(and outlook closed) to make this work. Also, if you don't
need Outlook, delete it from the computer. The command is
as follows:

DoCmd.SendObject [objecttype][, objectname][, outputformat]
[, to][, cc][, bcc][, subject][, messagetext][,
editmessage][, templatefile]

check help for the SendObject command for more details.
This will send the report in a similar manner as opening
it for preview or printing, the only difference is the
report text will be inserted into the E-Mail.

One of my applications has the following command:

DoCmd.SendObject acReport, "MyReportNamehere", "HTML
(*.html)",emailaddress, "", "", "MyMessageSubjectHere",
"",False, "".

emailaddress is a variant variable in my code. I send the
report to various people depending on several conditions.
I use this to build the E-Mail address string depending on
the conditions. You must build the string here just like
it would be assembled in Lotus. Lotus uses commas, so if
you have several people to whom your sending the
information it would look something like this when it is
complete:

emailaddress="person1@?.com, person2@?.com", etc.

The above command (sendObject)then will insert the final
string into your e-mail when it is created.

One last thing, I know there is a way to open an outside
program from within VBA, I am just not familiar with it.
You can start Lotus if it's not already active. If you do
this, I would think you'll also have to check to see if
the application is running before instantiating it again.

Good luck! I hope I have helped!

Kevin
-----Original Message-----
I'll put the report together. Once I have that done, what
coding will I need to use for the button, so that it pulls
the info and generates the letter in Lotus, rather than
Outlook.

.
.
 
I tried this code and it works with some formatting issues
(spacing mainly). One thing I also found was that for
some reports the HTML gets into the message body, but
others get pulled in as attachments (.xls). I have had no
luck debugging this.
Dave
-----Original Message-----
Try first creating a report that pulls all the information
you want from your form. Then using the following command:

DoCmd.SendObject acReport, "Your ReportName Goes
Here", "HTML
(*.html)",emailaddress, "", "", "Subject", "",
 
Back
Top