Save word file as pdf using vba

Sub savewithconverter dim cnvwrdprf as fileconverter look for wordperfect file converter and save document using the converter for the fileformat converter value for each cnvwrdprf in application. How to save a pdf file with a specific userdefined path. Excel vba introduction part 41 saving as a pdf youtube. Microsoft word vba to save document as a pdf in same. Ms word automation vba 6 responses on vba save a word document as a pdf andy bentley june 1, 2018 at 8. Vba saveprint a word document as a pdf developers hut. How to save a microsoft word doc as a pdf click the file tab in the topleft corner of your word screen. The first will provide you with the option to change file name and location, the second is a straight export, no questions asked. This function will also save any word document as a pdf. Vba code to save word document solutions experts exchange. Click export in the blue vertical menu that runs along the left side of your screen. View three pieces of content articles, solutions, posts, and videos. Exportasfixedformat method to save various elements of an excel file as a pdf document.

Saving word document as pdf using excel vba stack overflow. Notice that here the filefilter value is defined as pdf files, which means that the dialog box will only display any files with an extension of. Below is a simple vba macro that will allow you to quickly turn your selected worksheet s into a pdf file in a snap. Filefilter this defines the type of file extension to be filtered throughout the dialog window. If you need to make modifications, hopefully, you will be able to follow along below is a simple vba macro that will allow you to quickly turn your microsoft word document into a pdf file in a snap. How to save a microsoft word doc as a pdf or other file. The code is written to save your pdf in the same folder as the word document file currently resides. This vba macro will create a new document and save as using the current date and time. I recorded a macro in word to save the file as pdf and modified the. Use this selection object to type the text into the worddocument.