View Single Post
 
Old 09-03-2015, 03:13 AM
snoopy snoopy is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Sep 2015
Posts: 1
snoopy is on a distinguished road
Default Sending documents via email once converted into PDF

Hi all,

I have a problem that I'm not sure can be resolved, i currently use a command button to convert the word document into a PDF (as below)

Quote:
Private Sub CommandButton1_Click()
Convert_PDF
End Sub


Sub Convert_PDF()

Dim desktoploc As String
Dim filename As String
Dim mypath As String

desktoploc = CreateObject("WScript.Shell").SpecialFolders("Desk top")
filename = ThisDocument.Name
mypath = desktoploc & "\" & filename & ".pdf"

ActiveDocument.ExportAsFixedFormat OutputFileName:= _
mypath, _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=True, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
End Sub
I now want it to also send the PDF document in an email back to myself instead of the user having to save it and send it.

Im not sure that a VBA will be able to do, and if it can i don't know how to do it, can someone clarify?
Reply With Quote