|
-
Dec 12th, 2018, 02:33 PM
#1
Thread Starter
Hyperactive Member
SAVEAS PDF and Word 2016 and WIndows 10
Hello.. In Word 2010 and 2013 we were able to save a word document as a PDF. Now along comes 2016 and it no longer works.
This is my function which works great for 2010 and 2013.
Function Convert_To_PDF() As Boolean
Dim NewFileName As String
Dim fileFormat As String
oWord = CreateObject("Word.Application")
If ExtType = "DOCX" Then
NewFileName = PathSaveTo.Replace(".docx", ".pdf")
Else
NewFileName = PathSaveTo.Replace(".doc", ".pdf")
End If
fileFormat = Word.WdSaveFormat.wdFormatPDF
oDoc = oWord.Documents.Open(PathIn)
Dim newdoc As Word.Document
newdoc = oDoc
newdoc.SaveAs2(NewFileName, Word.WdSaveFormat.wdFormatPDF)
oWord.ActiveDocument.Close(False)
oWord.Quit()
PathSaveTo = NewFileName
Return True
End Function
What's up with 2016? Is there a work-a-round that will function with 2010 and 2013 AND 2016 ??
Thank you
gollnick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|