A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Send Report doesn't keep settings



 
 
Thread Tools Display Modes
  #1  
Old July 30th, 2009, 01:40 AM posted to microsoft.public.access.reports
Pamela
external usenet poster
 
Posts: 193
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.