Tuesday, November 23, 2010

How save Word documents to PDF in VBA ...

<p id='intelliTxt'> Microsoft Word 2007 is a Visual Basic for Applications (VBA) code editor, which controls that can be created on functions that are normally not available to run. ... .With Word 2007, you can use the VBA Editor to your Word documents to PDF format that can be useful to save if you want to distribute your reports and documents in a format other than ". .. Docx "format that uses Word. ... .Before you use VBA code to save documents in PDF format, you must enable support for Microsoft Word into PDF format with a free Microsoft add-in </ p> difficulty. .. Heading1 Moderately easy <h2 class = "Souligner .en-tĂȘte "> instructions <h2 class="Heading5a"> things you need: Microsoft Save as PDF or XPS <ol id = ' .. IntelliTXT '> <h4 class="Heading4a"> PDF support enabled in Word <li .id = 1 "jsArticleStep1"> <p> Open Microsoft Word 2007. ... .Click on the help icon in blue top right of the program. ... .Type "PDF and XPS" in the search box in Word and press Enter. ... .Click on "print, share and protect files in PDF and XPS file" result. .. </ P> <li id="jsArticleStep2"> 2 <p> Click "Install and use the Save as PDF or XPS. .Microsoft "in the" What do you do .. ... .Click the Internet link-blue form that says "Microsoft Save as PDF or XPS in Microsoft Office programs 2007 Add" button to be taken in the add-in download page. ... .Close the program Microsoft Word. .. </ P> <li id="jsArticleStep3"> 3 <p> Click "Download" from the add-in. ... .Save the file to your computer. ... .Double-click to open the file. ... .Click the check box to accept the terms of the license agreement for Microsoft software. ... .Click "Next" and wait for the installation. .. </ P> <h4 class="Heading4a"> create and run VBA code <li id="jsArticleStep1"> <p> 1 Open a Microsoft Word document that you .like. .Converted to PDF .. ... .Click the Office button and choose Word Options .. .To activate click on "Show Developer tab in the Ribbon" checkbox. ... .Click "OK". .</ P> <li id="jsArticleStep2"> 2 <p> Click the Developer tab in the Ribbon. ... .Click Macros in the "Code" of the group. ... .Type "SaveToPDF" or another name of your choice in the "Macro name" field. ... .Click the Create button. .. </ P> <li id="jsArticleStep3"> <p> 3 Enter the following lines of code, or copy the link in the "New Macros (Code) window in line. Direct .above "End Sub" line. .output file name ActiveDocument.ExportAsFixedFormat: _ActiveDocument.Path = & "\" & & ActiveDocument.Name. .. Pdf, export format: = _wdExportFormatPDF, open after export: = False, OptimizeFor: _wdExportOptimizeForPrint = Range. .IncludeDocProps = wdExportDocumentContent,:: = wdExportAllDocument, _items = True KeepIRM: = True, _CreateBookmarks = wdExportCreateNoBookmarks, DocStructureTags: = True, _BitmapMissingFonts: .= True UseISO19005_1 ". .Close and Return to Microsoft Word "= False </ p> <li id="jsArticleStep4"> 0.4 <p> Click the File menu and click. </ P> <li .id = "jsArticleStep5"> 5 <p> Click "Macros" in the "Code" in the group. .Developer tab. ... .In the name of the macro, select it, if it is not already selected click. ... .Click "Run" to run the VBA code and automatically save the Word document as a PDF file. ... .Navigate to the folder you saved on your computer, your Word document to PDF is to find the file. .. </ P> <li id="jsArticleStep6"> 6 <p> Open all other Word documents that you want to save. .PDF. ... .Click the "Developer", click Macros, select the name of the macro created and click Run. .. </ P> ...

No comments:

Post a Comment