title: Saving as PDF in word using VBA causes changes to the document
body: <p>I use the following code to quickly convert an active word document to PDF and save to desktop. It works very well but when I go to exit the document immediately afterwards it always asks if I want to make changes, when none should have been made.</p>
  
  <p>Is there a way I can prevent it making these invisible changes to the document so that it will just immediately quit (if it was saved just before the export, for example).</p>
  
  <pre><code>Sub PdfToDesktop()
  '
  '
  Dim DeskTop As String
  DeskTop = CreateObject("WScript.Shell").SpecialFolders("Desktop")
  
  Dim fileNameOnly As String
  Dim fileNameDot As Integer
  fileNameDot = InStr(1, ActiveDocument.Name, ".")
  
  fileNameOnly = Left(ActiveDocument.Name, fileNameDot - 1)
  
      ActiveDocument.ExportAsFixedFormat OutputFileName:= _
          DeskTop &amp; "\" &amp; fileNameOnly &amp; ".pdf", ExportFormat:=wdExportFormatPDF, _
          OpenAfterExport:=True, OptimizeFor:=wdExportOptimizeForPrint, Range:= _
          wdExportAllDocument, From:=1, To:=1, Item:=wdExportDocumentContent, _
          IncludeDocProps:=True, KeepIRM:=True, CreateBookmarks:= _
          wdExportCreateNoBookmarks, DocStructureTags:=True, BitmapMissingFonts:= _
          True, UseISO19005_1:=False
      ChangeFileOpenDirectory DeskTop
  End Sub
  </code></pre>