Macro to save docx to doc that checks compatibility and converts content controls to static content.
This is the macro I have now :
Option Explicit
Sub BAAR()
Const strDrive As String = "D:\MIHAI\DOSARE\BAAR\"
ActiveDocument.SaveAs2 strDrive & "raport" & ".docx"
ActiveDocument.ExportAsFixedFormat OutputFileName:=strDrive & "raport" & ".pdf", _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, From:=1, TO:=1, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateHeadingBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
lbl_Exit:
With Application
.ScreenUpdating = False
Do Until .Documents.Count = 0
.Documents(1).Close SaveChanges:=wdDoNotSaveChanges
Loop
.Quit SaveChanges:=wdDoNotSaveChanges
End With
Exit Sub
End Sub
I need to add code to convert the current docx file to a doc file with same name and also check compatibility and convert content controls to static content.
Any ideas ?
Thanks a lot.
|