|
Subject:
|
Exporting to Excel
|
|
Posted By:
|
swhite
|
Post Date:
|
9/15/2003 10:06:03 AM
|
Hi! Please, I would like to know if it is possible to export data from Access to an Excel file using
DoCmd.SendObject acSendQuery, "qryName", acFormatXLS, _ cboRecipient, , , "Subject Line", _ "Dear " & cboRecipient & ":" & Chr(10) & _ "Comment to recipient" & _ Chr(10) & Chr(10) & _ "Thanks," & _ Chr(10) & _ cAuthor
but somehow alter the default of the file exported to Excel, such that the top row of the exported file (the header row) is not shaded grey? I think this must be the default setting when exporting queries. This is a user request...apparently the exported grey top row blends in with Excel's grey columns (A,B,C,etc..) and some of the recipients don't realize the top row is a header. Goofy huh!?! In any case, can anyone help me find a way to make the recipients happier? Any help would be greatly appreciated.
Thank you so much in advance
|
|
Reply By:
|
Steven
|
Reply Date:
|
9/17/2003 2:28:26 AM
|
Could you export it as a CSV? - most people have Excel as the default CSV handler, so they'd see an Excel icon for the file, which should please them.
HTH Steven
I am a loud man with a very large hat. This means I am in charge
|
|
Reply By:
|
swhite
|
Reply Date:
|
9/18/2003 9:42:00 AM
|
Steven - Hi, thanks for the suggestion. I think that would workout perfectly if only I could do that through the code I used... The code below is how it gets exported to email - and acFormatXLS is the output format. acFormatCSV does not work, acFormatTXT does not work, as the end recipients are not the most computer literate to delimit the txt file. But I thank you for the suggestion - is it possible that there is some other code I could write that would do what I am trying to accomplish, yet export it as a CSV??
Any help would be very much appreciated, Sean
DoCmd.SendObject acSendQuery, "qryName", acFormatXLS, _ cboRecipient, , , "Subject Line", _ "Dear " & cboRecipient & ":" & Chr(10) & _ "Comment to recipient" & _ Chr(10) & Chr(10) & _ "Thanks," & _ Chr(10) & _ cAuthor
|
|