Simplifly repetitive text placement with this VBA


Ask Inga logo

Original Article Date: Feb 14, 2005

With many thanks to Mike Francisco for this very powerful tool to assist with the placing repetitive text in your file. Most definitly a nice addition for the production user.

This vba was inspired by Thor Leslie’s [[Simplify Filling in Repetitive Enter Data Fields|Enter Data Fields - VBA]] . I liked the idea, but I no longer use data fields so I wrote a similar VBA to place text.

Download 231.zip and extract TextNodes.mvba from the zip file.
Place the mvba in the folder pointed to by MS_VBASEARCHDIRECTORIES
Keyin vba load TextNodes to load the project.
Keyin vba run place_text to run the macro.

Once loaded, you will be presented with the following dialog and buttons:

Text placed in the textboxes can be either single-line or multi-line. In the case of multi-line text, you can use CTRL + Enter to start a new line. Text can be placed as a note (ie: Place Note) or regular text by choosing the desired option for Type of Placement.

The dialog starts with just one textbox showing, but can be expanded by picking the arrow button to the left of the textbox.

Several characters have a special meaning to sendkeys function used in this VBA.
This means that when you need to use any of these four characters you must enclose them in brackets { }.

The characters are:

+ Plus
^ Caret
% Percent
~ Tilde

For example, when needing to enter a station value such as 23+000, you would keyin 23{+}000


Using the VBA Editor will allow you to edit frequently used text for the Combobox Pull Down at the bottom of the dialog.

Enjoy!

This program is supplied as is. This program does not come with support. AskInga, Bentley Systems Inc., and the author of the program assumes no liability for damages direct, indirect, or consequential, which may result from the use of this program. Use this program at your own risk.

AskInga Article #231