Why does Word VBA tell me that a dialog box is open? -


I am trying to copy a document to a selection and have been exporting it to PDF, but I am getting an error that I can not solve the line on

. False being told I ActiveWindow.Close

Run-time error '5479':
You can not close Microsoft Word, Because a dialogue box is open. Click OK, switch to the word and then close the dialog box.

While exporting to PDF operation is firing up a dialogue, I do not know what open dialogue.

Can anyone leave some light? . Thank you

  '** Copy select * Create a new document' Selection.Copy Documents.Add blueprint copy paste text in "** *" = "Normal", NewTemplate: = False , DocumentType: = 0 '** paste text *' Selection.PasteAndFormat (wdUseDestinationStylesRecovery) ChangeFileOpenDirectory copied OpenDirectory '** change the file open directory * place' ** PDF * to export the document to 'ActiveDocument.ExportAsFixedFormat Output filename: = _ Open Directory & amp; "\ ZENworks.pdf", ExportFormat: = _ wdExportFormatPDF, OpenAfterExport: = True, OptimizeFor: = _ wdExportOptimizeForPrint, range = WdExportAllDocument, by: = 1, to: = 1, _ Item: = wdExportDocumentContent, including Krendokprop = true , KeepIRM: = true, _ CreateBookmarks: = wdExportCreateNoBookmarks, DocStructureTags: = true, _ BitmapMissingFonts: = true, UseISO19005_1: = false '** new document Close *' false CopyToNewDocument ActiveWindow.Close = true  

it should be ActiveDocument.Close instead of to ActiveWindow .close .


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -