change page orientation on pdf export to email code

splreece

Registered User.
Local time
Today, 17:43
Joined
Jun 2, 2016
Messages
40
morning all,

I'm new to vba so very much loving forums and google. Its a huge learning curve but forums like this have been invaluable...

I have a simply piece of code that takes the current userentry and emails it in a pdf...

only problem is the page orientation is portrait and I either need it landscape or to fit all detail on one page (ideally landscape).

I'm struggling with how to add a landscape request.

Dim f As Form
Set f = Forms![Employee Details]
f.Filter = "ID=" & f!ID
f.FilterOn = True
DoCmd.SendObject acSendForm, f.Name, acFormatPDF, "*** Email address is removed for privacy ***", , , "test", "See attached", True
f.FilterOn = False
Set f = Nothing


any ideas would be great
 
simple, create same report as landscape. then output that one as pdf.
 
thanks for the quick reply. so how is that done in vba. sounds like I need to create the query, then report then link the report via the userform button.

I would prefer to have it done without additional reports/queries as this single piece of code does everything except landscape commands.
 

Users who are viewing this thread

Back
Top Bottom