If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Send Report doesn't keep settings
I created a cmd button using the wizard to send the specified report. We
then choose Excel as the format/program to write it and it automatically opens Outlook at attaches our report as a spreadsheet to a New Message. The spreadsheet version of our report, however, doesn't keep the landscape setting. I tried searching for help on it and found some code that looked similar to what I am trying to accomplish and pasted it into my OnClick event, but it isn't working...Please Help!! How can I do this all automatically?? Thanks so much! Here's is my code: Private Sub MailtoTim_Click() On Error GoTo Err_MailtoTim_Click Dim stDocName As String stDocName = "rpt_OpenAssnsAll" DoCmd.SendObject acReport, stDocName appxls.ActiveSheet.PageSetup.PrintArea = "" With appxls.ActiveSheet.PageSetup .Orientation = xlLandscape .PaperSize = xlPaperLegal End With Exit_MailtoTim_Click: Exit Sub Err_MailtoTim_Click: MsgBox Err.Description Resume Exit_MailtoTim_Click End Sub Thanks again! Pamela |
Thread Tools | |
Display Modes | |
|
|