Last active
          April 25, 2018 14:04 
        
      - 
      
- 
        Save kebien6020/08bc7d8ae3f8d04ccfaa27f690570331 to your computer and use it in GitHub Desktop. 
    Word vba macro to instantly export as pdf in the same folder
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Sub ExportAsPDF() | |
| 'Instantly export as pdf in the same folder | |
| ActiveDocument.ExportAsFixedFormat OutputFileName:= _ | |
| Replace(Replace(ActiveDocument.FullName, ".docx", ".pdf"), ".doc", ".pdf"), _ | |
| ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _ | |
| wdExportOptimizeForPrint, Range:=wdExportAllDocument, Item:= _ | |
| wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=True, _ | |
| CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _ | |
| BitmapMissingFonts:=True, UseISO19005_1:=False | |
| End Sub | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment