DoCmd.SendObject xls landscape

C

Claes D

Hello all.

I am sending a query as .xls in a mail, using the following code.

DoCmd.SendObject acSendQuery, strReportName1, acFormatXLS, Me![To], , ,
Me![Subject], Me![Message], False

I would like to get the xls-file that is created as landscape instead of
portrait.
I have tried the TemplateFile, but it doesnt work.

If I could get it as landscape would be enought, but it would be great if I
could choose the column width.

Grateful for all ideas.

BR
Claes
 
A

Alex Dybenko

hi,
not sure you can do so just using DoCmd.SendObject. Suggest to output query
to excel file, then open it in Excel using automation, format the way you
like and then send if with email as attachment

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
Top