vovavermont.blogg.se

Word macro to addpdf to word
Word macro to addpdf to word









word macro to addpdf to word
  1. WORD MACRO TO ADDPDF TO WORD PDF
  2. WORD MACRO TO ADDPDF TO WORD PLUS

If you're stuck at any point feel free to: I know this is a bit tricky because of the differences in the details of the Office Versions (e.g. No more "Save As" dialogs and adventures through file type menus.

word macro to addpdf to word

Now on any new document - after you saved it - clicking this button will instantly save your file as a PDF. Select the Macro (on the left) and the new group (on the right) and click "Add" (top button in the middle).Īfter adding rename our Macro (on the right side - right-click) to something you like. You can edit the properties with the context menu (right-click). Open "View" in the tree-structure on the right and click "Create Group". Select "Macros" in the left drop-down list. But it's common that you have to right-click on your toolbar / ribbon and select the "Edit Toolbar" item.

word macro to addpdf to word

So, this is also different in all the Office versions. Step 3 Creating a new button for our Macro If InStr(1, ActiveDocument.Name, ".") = 0 ThenĪctiveDocument.SaveAs2 Replace(ActiveDocument.FullName, ActiveDocument.Name, "") + Mid(ActiveDocument.Name, 1, InStr(1, ActiveDocument.Name, ".") - 1) + ".pdf", Ĭlick "Save" in the upper left of the window and close it. These two lines of VBA-Code should already be there:Īdd the following lines in-between those two predefined function lines: Step 2 Coding our Macroīe sure that "Normal"->"Modules"->"NewMacros" is selected in the upper left tree-structure (like in the image) Click on "Edit" to open the coding window of our project. The name should appear in the list below. If you are not using Word 2010, try this.Ĭreate a new Macro: Enter a name for our Macro - let's say "PDF" - and click on "Create". All this can also be done by holding ALT and pressing F K M. Open the VBA menu by selecting the "Views" and selecting "Macros" -> "View Macros".

WORD MACRO TO ADDPDF TO WORD PDF

For Office 2007 you'll need the PDF extension.

WORD MACRO TO ADDPDF TO WORD PLUS

  • This tutorial is based on Microsoft Office Professional Plus 2010, but works with other versions, as well.
  • This article uses German interfaces, but the screenshots should be clear enough for all languages.
  • We will modify our normal.dot Word-Template to include a VBA-Macro, which saves our file as PDF. The image on the right is what it will look like. The Macro we are going to write will literally save the file as PDF in the same directory and with the same filename as the opened document. We are going to use the function to create Macros, which are little 'programs' in Office applications. In this article, we're going to create an additional button in our Word toolbar which creates a PDF file of our loaded file with one simple click.











    Word macro to addpdf to word