Set Column Width in EMailDatabaseObject (1 Viewer)

RogerCooper

Registered User.
Local time
Today, 02:00
Joined
Jul 30, 2014
Messages
277
I have many queries that I run and e-mail as xlsx attachments. I notice that when received by the users, the columns widths vary and are usually too large.

Is there any way of controlling the column width in the created spreadsheet.
 

RogerCooper

Registered User.
Local time
Today, 02:00
Joined
Jul 30, 2014
Messages
277
As I understand it, Excel Automation allows me to use Excel objects in Access. But what I need to do is to control the way Access creates an Excel file. I don't see how automation would help me.
 

Minty

AWF VIP
Local time
Today, 09:00
Joined
Jul 26, 2013
Messages
10,353
It's the only way you can apply formatting to your excel file. The work flow from Access would be something like;

  • Export the query to the excel file to be emailed, saved to a known file location and name.
  • Open the file using automation and apply the formatting you require.
  • Save the now formatted file
  • Email it as an attachment.

This will require a bit of work, and probably a learning curve of how to apply the formatting you need, but it is a widely used method.
 

Users who are viewing this thread

Top Bottom