View Single Post
 
Old 04-10-2013, 02:21 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub PDF()
 
' pdf Macro
Dim StrName As String
With ActiveDocument
  StrName = .FullName
  StrName = Left(StrName, InStrRev(StrName, ".")) & "pdf"
  .ExportAsFixedFormat OutputFileName:=StrName, UseISO19005_1:=False, _
    ExportFormat:=wdExportFormatPDF, OptimizeFor:=wdExportOptimizeForPrint, _
    OpenAfterExport:=True, Range:=wdExportAllDocument, From:=1, To:=1, _
    Item:=wdExportDocumentContent, IncludeDocProps:=True, _
    KeepIRM:=True, CreateBookmarks:=wdExportCreateNoBookmarks, _
    DocStructureTags:=True, BitmapMissingFonts:=True
End With
End Sub
PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote