acFormatHTML strangely outputting as .xls

Jamesss

Registered User.
Local time
Today, 09:07
Joined
Dec 7, 2008
Messages
27
I have been using the following code to send a report to lotus notes email client as an embedded html in the body of an email.

It has been working well until this morning when Access was forced to shutdown. When I run this piece of script the report is not embedding as an HTML but instead attaching itself to the bottom of the email as an .xls with the naming convention of "CDB**.xls".

Code:
DoCmd.SendObject objecttype:=acSendReport, _
ObjectName:=strDocName, outputformat:=acFormatHTML, _
To:=strEmail, Subject:=strMailSubject, MessageText:=strMsg

Does anyone know what might be going on and can recommend a fix?

Thanks, James
 
:oAfter an hour of google trawling. The problem appears to be with the email client.

It appears that lotus notes stores a temporary file of the same name as the report in its temp folder. It would appear that when Access crashed the file was not deleted (assuming that it is done automatically)

If you delete this temp file it solves the problem. :o
 
I'm trying to accomplish having a report sent via email in the body of the email. Can you provide more of your script?
 

Users who are viewing this thread

Back
Top Bottom