View Single Post
 
Old 02-01-2018, 11:26 AM
hysterical.useless hysterical.useless is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2018
Posts: 12
hysterical.useless is on a distinguished road
Default Macro to auto-save pdf using text on page + current date

I have done a bit of research on this topic, but can't seem to find exactly what I am looking for. I would like to create a macro - preferably a keyboard shortcut over a button - that will allow me to automatically create a pdf copy of the document using a specific naming convention. This is the naming convention:

Boilerplate - Lorem Ipsum - Date

Where "Boilerplate" is the same text every time, regardless of the document; "Lorem Ipsum" is text found on the page, highlighted in red in the attachment; and "Date" is the current date in the "yyyy-mm-dd" format.

I'd prefer the pdf to save wherever the document is, but if that is a hassle to code, saving to the desktop would be fine.

Finally, I was just introduced to Word's field code display feature (thanks macropod!) and am wondering if it's possible to use that (or another feature) to create "linked text"; in other words, text that changes based on designated reference text. For example, in the attachment, I've highlighted two instances of "Lorem ipsum". I'm looking for a way to change the first instance that instantly changes the other instance in the table. I assume this can be accomplished using the bracketed ( {{}} ) field code display, but I'm not sure. This is important to the pdf macro, because it draws on this text to create the filename.

Let me know if you have any questions; thanks in advance!
Attached Images
File Type: png template example.PNG (38.8 KB, 22 views)
Reply With Quote