Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendobject - acFormatSNP is attaching a report as CDB47.xls

Status
Not open for further replies.

Sneakz

Programmer
Sep 9, 2009
2
US
I have Access 2003.

I'm e-mailng a report in snapshot form with the following code in VB:

DoCmd.SendObject acSendReport, strReport, acFormatSNP, strEmailAddr, , , strEmailsubj, strEmailMsg

This code works when fired off some of my forms, but one form is making the report attach as CDB47.xls. If you open the excel file it is just garbled characters....

if I modify the line to acFormatHTML it prints fine in the e-mail, but i really need the snapshot. Also I have a button on the form to view the report and it opens and displays normally. But when you e-mail using that code, it attachs that lame excel file. Someone please help! I don't get why it works on some forms but in this particular one it isn't.
 
OMG... PROBLEM SOLVED...

I hate how you have to search 30 different wordings of your problem on the net to finally land the jewel that explains everything...


The problem was with lotus notes... if the attachment process fails, it stores a temp file in your temp directory with the file name, so when u try to attach again, you get a wierd file name and extension even though the file really is the file you attached.... Just delete the file out of your temp directory and PROBLEM SOLVED

Here is the official Microsoft link in case someone runs into this aggrevating problem down the road.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top