Word Macros
Click on any link below to download the required zip file.
Depending on your operating system and security settings, you will either be prompted to save the zip file or your zip application (e.g. WinZip) will open and display the contents of the zip file.
The zip files each contain a bas file for import into Word via the VBA import function.
In Word, locate the VBA Editor. Try Tools | Macros | VBA Editor OR Alt F11.
Create a new module as shown below. Call it whatever you want.

Then right click the module and select Import. Import whichever macros you want to use.
Then either go to Tools | Macro | Macros, select the macro and click Run OR customise a toolbar and add the macro there.
If you want to see the content of the bas file before importing it into Word,
open the file with a text editor such as Notepad.
|
Word Macro |
Action |
|
Puts selection in round brackets () |
|
|
Puts selection in quote marks |
|
|
Puts selection in html tags <> |
|
| Add Page Numbers after hyperlinks in RoboHelp Printed Documentation | In your printed documentation, you may have something like Figure 1 which is fine for anyone viewing the document on a PC. They can click the hyperlink and see Program Access. But what about someone reading hard copy? It's not much use to them is it? They have to go to the Table of Contents and locate "Program Access". Figure 1
Now thanks to HansV, a long term supporter of Woody's Lounge, the macro below will amend your document so that it reads as shown in Figure 2. The macro itself is shown in Figure 3. Figure 2
Figure 3
The lines r.InsertAfter allow you to define the text surrounding the page number to whatever you want. This requires some thought as you need to find a single string of text that will always work. The string works for my documents regardless of whether the hyperlink is followed by a full stop (period) or a space. If the hyperlink is already followed by something in brackets, then you will end up with text as in Figure 4. Figure 4
You will need to run the macro a few times and check the results to see what text works best for you. The hyperlink is left working for the benefit of anyone viewing the Word document on their PC. Also removing it would destroy the context of your documents. Imagine the examples shown without the hyperlinks being left in place. The usual warning, backup your document before you run the macro. Hans. Many thanks from the technical authoring world for this macro. |
|
With cursor in a cell with text, the macro copies text to each blank cell below until it finds another value. That value is then copied and the process repeats. |
|
|
Seven macros
The above macros have clearly marked sections that apply the formatting so that you can substitute what you want in place of what I use. |
|
|
Prints current page. |
|
| Remove blank line from RoboHelp printed output | Sometimes you will see a heading style one line down from the top of the page when you generate printed output from RoboHelp. The problem is described in Printing. Run this macro to remove just those blank lines. |
|
Removes all bookmarks from a document. Use with care. |
|
|
Two macros
|
|
|
This zip file also contain a frm file. See the readme text file. |
Run the Style Changer macro to display the Style Changer dialog. The dialog doesn't do anything more than the standard Find and Replace, it just makes it a lot quicker. Word's Find and Replace function requires ten clicks before the operation starts whereas this requires one click to display the dialog box, then select the two styles and one more click to start the operation. Also Word's function requires you to select from the list or you can type just the first letter of the style. If that does not find the style, you have to scroll down to locate it. This method allows you to keep typing the style name until it is found. |
Donations
If you find the information and tutorials on my site save you time figuring it out for yourself and help improve what you produce, please consider making a small donation.

