Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #109070
| From | Claus Busch <claus_busch@t-online.de> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Print, Save as PDF, Email PDF code |
| Date | 2016-07-09 22:57 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <nlroeu$db8$1@dont-email.me> (permalink) |
| References | <fe04cca4-15bb-4cf9-a56e-dc718855faac@googlegroups.com> <nlro83$cmk$1@dont-email.me> |
Hi again,
Am Sat, 9 Jul 2016 22:53:21 +0200 schrieb Claus Busch:
> try:
>
> Sub PrintSheets()
better readable:
Sub PrintSheets()
With Sheets("Quote")
.PrintOut Copies:=1
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"R:\emailed quotes\" & .Range("M1") & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
End With
Sheets("Sheet1").PrintOut Copies:=1
SendMail
End Sub
Sub SendMail()
Dim objOutlook As Object, objMail As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objMail = objOutlook.Createitem(0)
With objMail
.to = "claus_busch(at)t-online.de"
.Subject = "Expected PDF file"
.body = "Hi Claus," & Chr(10) & Chr(10) _
& "Here is the mail with the expected PDF"
With .attachments
.Add "R:\emailed quotes\" & Sheets("Quote").Range("M1") _
& ".pdf"
End With
.send
End With
End Sub
Regards
Claus B.
--
Windows10
Office 2016
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Print, Save as PDF, Email PDF code Paul Doucette <pauld@mewood.com> - 2016-07-09 13:11 -0700
Re: Print, Save as PDF, Email PDF code Claus Busch <claus_busch@t-online.de> - 2016-07-09 22:53 +0200
Re: Print, Save as PDF, Email PDF code Claus Busch <claus_busch@t-online.de> - 2016-07-09 22:57 +0200
Re: Print, Save as PDF, Email PDF code Paul Doucette <pauld@mewood.com> - 2016-07-09 14:57 -0700
Re: Print, Save as PDF, Email PDF code Paul Doucette <pauld@mewood.com> - 2016-07-09 21:24 -0700
Re: Print, Save as PDF, Email PDF code Claus Busch <claus_busch@t-online.de> - 2016-07-10 10:52 +0200
Re: Print, Save as PDF, Email PDF code Claus Busch <claus_busch@t-online.de> - 2016-07-10 11:04 +0200
Re: Print, Save as PDF, Email PDF code Paul Doucette <pauld@mewood.com> - 2016-07-10 07:15 -0700
csiph-web