Question : Access attaching a file as xls when it should be rtf

We have an Access 2003 database (in Access 2000 format) that a group of 8 people will run macros to run and then attach reports in emails.  So in the Macro definition, I use the SendObject command with the following settings:

Object Type: Report
Object Name:
Output Format: Rich Text Format
To:
Subject:
Message text: "Please find attached"
Edit Message: No

This works fine on everyone machine.....except one.  The report runs but instead of attaching an RTF file it attaches an excel file.  If you save the excel file attachment to your desktop and rename it as a document, its fine.  But we cant do that since the recipients need it as a RTF document in the first place.

I know some answers might be to check his machine but heres where it gets weird.  I created some other reports and used the same settings as above and it works - the attachments are RTF as expected.  

So it appears that this problem is for one report for one person....any ideas why?

Answer : Access attaching a file as xls when it should be rtf

Try the usual, one at a time:

1. Run the Compact/Repair utility

2. Decompile the Database: http://www.granite.ab.ca/access/decompile.htm

3. Create a new database and import all of the objects into it.

4. Try the same code on another profile, on the same machine.

5. Make sure you install all the latest Service Packs for Office *And* Windows.

6. Completely uninstall Office (not just Access), then reboot.
Then make sure you do a *Full* re-install of Office.

JeffCoachman
Random Solutions  
 
programming4us programming4us