

It will suggest a filename, which you can change and it will warn you when you’re about to overwrite an existing file. This macro essentially just calls up the ‘Save as…’ window and pre-selects the PDF format. dot(x) file but that would only get you into trouble with all sorts of security restrictions in your browser or in Word, so doing it this way is easier.
#Word document save as pdf file code#
Basically you create a new macro and paste the below code into it, then save.
#Word document save as pdf file how to#
You can find out how to add a macro to Word here. Hang on, where do I put this code?, you ask.

Some steps for adding it as a button to a toolbar follow below. Pick whichever one you like and add it to Word. The first will provide you with the option to change file name and location, the second is a straight export, no questions asked. The macros below do only one thing: they save the currently open file as PDF, by default in the same folder, with the same file name. I generate PDFs practically everyday, so I wanted something easier. But that option is buried in the ribbon interface and involves quite a number of clicks. In recent versions of Word, it is also pretty simple: just Save as… and select PDF. In LaTex, creating PDFs is a question of one simple command (plus a bit of fiddling with settings).

One of the most common word-processing related task for academics is to generate PDF versions of documents - for sharing with colleagues, for submission to a journal, for uploading to a publication page, et cetera.
