How to create a new custom style with specific heading

839 Views Asked by At

Please help as I am new to Vba and custom style in MS Word 2013. I want to create a new custom style that provides heading as INTRODUCTION when a paragraph is been selected, and the rest of the text should come in normal style of paragraphs. Is this possible to make it in custom style or should Vba macro be used. If Vba macro is the only option then how can we add this into the particular custom file.

1

There are 1 best solutions below

2
Matthew Miner On

Styles are for formatting only, they don't contain text (such as INTRODUCTION). If I understand your request, you will need a simple macro you can write, or, actually, record.

So, let's say you have a paragraph in your document. You would like to make this paragraph have the "Normal" style. You would like to insert BEFORE this paragraph the word "INTRODUCTION", and give it the style "Heading 1".

Record the Word macro: InsertIntroduction

  1. Position the cursor at the start of the paragraph.

  2. Enable "Record a macro" - varies by release of Word, but, for 2010, View > Macro > Record. Be sure to specify a good name and a carefully thought out Description. Do NOT shirk this step! Put in the Description! If you are going to use it a lot, assign a keystroke to it also, that will save you a lot of time.

  3. Type INTRODUCTION. Using cursor keys (not mouse), select it (perhaps up-arrow, Home, Shift-End). Apply style "Heading 1" (for this, you can use the mouse: Home > Style group > Heading 1 or a keystroke, usually Ctrl-Alt-1).

  4. Arrow down to the next paragraph. Select the full paragraph using the keyboard, not the mouse (perhaps by hitting the F8 key four times, then ESC).

  5. Apply the appropriate style (again, you can use the mouse, but the Normal style is usually linked to Ctrl-Shift-N).

  6. You've completed the steps you wanted, based on your original request. Note that you can add a lot more, of course. But, let's say you're done.

  7. View > Macro > Stop recording.

  8. You've now written a program and it will be saved. Use it going forward. Cool, hunh? And you can write these things a lot faster yourself than asking others "how do I...?"

  9. Like any other program, it can be modified to do more, or fix little errors. Let's say you misspelled INTRODuCTIoN. Tap Alt-F11 to see your program. Adjust.

9 steps seems like a lot, but, believe me, it's easier done than said. Give it a try. Do it carefully. In theory, if you make a mistake, you can simply modify the program to fix it. But, at your level of experience, you may find it easier to simply Stop recording and start over.

To Use Macro

  1. Position cursor at start of relevant paragraph.

  2. Execute macro. If you took my advice and assigned it to a keystroke, just tap the keystroke. If not, tap Alt-F8 to see a list of your macros. Select the one you want, and click Run.