I have code (attached) that works as far as sending the document as a macro enabled document.
I have tried messing around with the "activedocument.fullname" part to change it to have a PDF suffix, but with my limited knowledge of VBA i'm getting nowhere.
What I would like the code to do is send the current word document as a PDF file to email recipients instead of a macro enabled document, as people need to open it on their smart phones so PDF is the best option.
As always any help is greatly appreciated.
Dim olkApp As Object
Dim strSubject As String
Dim strTo As String
Dim strBody As String
Dim strAtt As String
strSubject = "Plant 2 Downtime document"
strBody = "Please see attached File"
' strTo = "firstname.lastname@example.org"
strTo = "email@example.com"
If ActiveDocument.FullName = "" Then
MsgBox "activedocument not saved, exiting"
If ActiveDocument.Saved = False Then
If MsgBox("Activedocument NOT saved, Proceed?", vbYesNo, "Error") <> vbYes Then Exit Sub
strAtt = ActiveDocument.FullName
Set olkApp = CreateObject("outlook.application")
.to = strTo
.Subject = strSubject
.body = strBody
Set olkApp = Nothing