SendObject and Excel Attachments in wrong format

  • Thread starter Thread starter jtbowlin
  • Start date Start date
J

jtbowlin

Guest
I'm new to this newsgroup and need help with a frustrating problem I've been encountering. I use the SendObject command in my macro to send an excel spreadsheet to an external user. The problem I have is that when anyone external gets the message it is in MIME format and shows the spreadsheet not as an attachment but as computer code in the email. Anyone internal gets it fine. Below is an example of what someone on the outside gets. Any help would be appreciated. Thanks.

JT

Subject: INTEL VIDEO Weekly Dell POS Report FW18
Date: Thu, 12 Jul 2001 11:31:38 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: multipart/mixed;
boundary="----_=_NextPart_000_01C10AF0.1FDC3AC0"

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C10AF0.1FDC3AC0
Content-Type: text/plain;
charset="ISO-8859-1"

The reporting process for POS reports has changed. It has been pushed to an
automated weekly process. We are sending reports dating back to June weekly
to get everyone up to date. June will be FW18-FW21. You will also receive
FW22 (first week in July when these are completed). Then you will receive
each previous weeks data by Tuesday of the next week. Sorry for the
inconvenience, but now we should be on track with these reports.

JT Bowlin
Manager - Pricing and Metrics
<<INTEL VIDEO.xls>>

------_=_NextPart_000_01C10AF0.1FDC3AC0
Content-Type: application/vnd.ms-excel;
name="INTEL VIDEO.xls"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="INTEL VIDEO.xls"

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAA
EAAAAgAAAAEAAAD+////AAAAAAAAAAD/////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
 
Are the external mail clients the same as the internal? You may want to use something like this in place of the SendObject:

Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.getNameSpace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)

' send the created file from above now
EmailSend.To = "EmailAddress@there.com"
EmailSend.Attachments.Add "c:\YourFile.txt"
EmailSend.Send
 
This happened to me because my mail application crashed while trying to send one of these and the previous file got stuck in my temp directory.

Check for the file name it's trying to send in <home>/local settings/temp (or just clear that entire directory).

This resolved it for me.

I saw another post (us.generation-nt.com/answer/sendobject-function-attaches-report-wrong-format-help-9283742.html) that indiciated that changing the name of the report/form "resolved" the issue for that person.

I know this is years after the initial issue, but this was one of the top hits on google, and I want to help other people solve this. I found this searching for "access sendobject wrong format"
 

Users who are viewing this thread

Back
Top Bottom