Full Version: Export of Table to Excel
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
hsotb
I'm using the DoCmd.SendObject to send a table in excel format via email. Im using the MicrosoftExcelBiff8(*.xls) and run into the following problem.

A field in the table is formatted as Memo but when it gets transfered it goes to Text (255 limit). But when I do just a TransferSpreadsheet it remains a Memo field.

Here is the complete command that I'm using

DoCmd.SendObject acTable, "Table_name", "MicrosoftExcelBiff8(*.xls)", "Myemail@mail.com","","","File attached","", False, ""

Now I also did some testing and did the sendobject in a macro and it worked just fine, but for some reason the VBA version is not working..

Any suggestions would be helpfull.

Thanks
freakazeud
Hi,
did you convert the macro to VBA to check the arguments and see if they match up to what you have?
HTH
Good luck
hsotb
Yes I did.

They match perfectly......
freakazeud
If you want to continue to use the outputto/sendobject method then check this.
If you don't care then use the transferspreadsheet method...and attach the outputted file to an automated email using automation code (search UA for many samples). The sendobject method is very limited anyway.
HTH
Good luck
hsotb
Thanks for the link it will be very helpfull.

Just to get it out I'm using the macro, not the best way but hey it works.
freakazeud
Glad you got it sorted out.
Good luck on future projects!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.