Poll

Aboot this blog

This blog is a cross between a scrapbook and a diary. I hope you find something here of interest. If you’d like to keep up with things as I see them then you can subscribe to my news feed by clicking the icon below:

feed-icon-28x28.png

DISCLAIMER

Please note that any reviews/recommendations are based solely on my own experience and does not constitute a guarantee that you will have the same experience. Please do your own research before parting with any money - the risk is all yours!

The Briticiser

Looking for my world famous US to GB English spelling converter?

THE “BRITICIZSER”

www.us2uk.eu

IT’S HERE

Tags

  VBA     Hardware     Browsers     Overcoming Disabilities     Plausible Lies     Odds and Sods         Reviews     Equipment     Software     PHP     Word     Utilities     Education     Bits and Bobs     Excel     Family     News     Tutorials     Flatpress     Acrobat     Windows     3D Stuff     Bookmarks  

Find me on Facebook

facebook-icon-28x28.pngVisit my Briticiser Facebook Page to keep up with things here - lots of reviews of stuff I’ve really used and also all kinds of helpful computer tips with a heavy bias towards SAVING YOU TIME.

A quick way to set the Subject in Word document properties

Permalink: http://paul.us2uk.eu/?x=entry:entry140131-170717

Making full use of the document properties sheet for a Word document (or any document) is not only good practice but it’s more useful than you might at first think because you can use this information in a number of ways, not the least of which is to simply see what the document is about without having to open it, often simply by hovering your mouse over the file name in Windows Explorer…

image

Setting the document properties is a bit of a chore, to be honest, and busy people tend to follow the line of least resistance… and just ignore it. Even though some companies insist that their staff use the document properties to enable the documents to be more easily searched and sorted, it’s a difficult thing to police.

Here’s a much easier way to set the document properties which really is as simple as selecting some text and doing a simple keystroke. This example shows you how to set the document’s “Subject” field.

If you’ve used Word for any length of time you’re probably aware that you can select some text and press CTRL+C (the Ctrl Key and the C key together) to copy that text to the clipboard, so you can paste it somewhere else. Here’s a macro which allows you to do much the same thing but, instead of copying the selected text to the clipboard, it sets it as the Subject field in the document properties - yes, as simple as that.

The easiest way to add this useful trick to your armoury is to record a new macro, as follows. Note that the following instructions are specific to good old Microsoft Word 2003/XP - I guess I’ll never make that switch to those confounding ribbon menus!

Click on Tools on the menu bar at the top of your screen, then click Macro… Record new macro… and give it a memorable name such as “UseSelectedTextForDocSubject”, make sure that the “Store macro in:” field is set to “All Documents (Normal.dot)” as shown below, then click on the Keyboard button where it says “Assign macro to”.

imageYou will see another box popup prompting you to assign your preferred shortcut key combination - this can be almost anything but I try to stay away from any combinations involving keys which I already know are used to perform common functions, so I plumped for Alt+Ctrl+J as my preferred combination (I can remember this as the first letter of the second syllable in sub-Ject). In this new box you will see a “Press new shortcut key” key field. Click in this field if it’s not already active and press the Alt, Ctrl, and J keys together and your chosen key combination will be displayed in the window, then click “Assign”, and then click “Close”.

image

You will then be returned to your document with the macro record/stop recording button floating there somewhere (look for the red dot). Just click the blue square at this point, because you don’t actually want to record anything - all we wanted was to create a new blank macro.

image

The next step is to press Alt+F8 (the same as choosing “Tools>Macro>Macros…” via the menu) to being up a list of macros which are available to you. Your new macro should be in the list so click ONCE on it (simply to highlight it) then click on the Edit button.

image

This will open up the macro editor. All you need to do now is type the following line right above where it says “End Sub”:

ActiveDocument.BuiltInDocumentProperties(wdPropertySubject) = Selection.Text

So, your code should look something like this:

image

That’s all there is to it. Close the editor and try out your new macro by selecting some text and pressing Alt+Ctrl+J to see how easy it is to set the Subject in document properties.

This same technique can be used to set other properties fields as well, but I’ll leave that for your own further exploration.

Support our caregiving

If you found anything on this site of use, interesting, or even mildly amusing then please consider dropping a few pennies in the jar to help us to take care of our disabled son who contracted encephalitis in 2007 at the age of 6 and who is now confined to a wheelchair. He is getting bigger as his mother and I get older, imagine that, please. Every penny we collect goes towards his upkeep, and towards his future care requirements.

Thank you.

Support our caregiving

Support our caregiving

If you found anything on this site of use, interesting, or even mildly amusing then please consider dropping a few pennies in the jar to help us to take care of our disabled son who contracted encephalitis in 2007 at the age of 6 and who is now confined to a wheelchair. He is getting bigger as his mother and I get older, imagine that, please. Every penny we collect goes towards his upkeep, and towards his future care requirements.

Thank you.