PDA

View Full Version : userform and autotext



kenparker23
12-06-2007, 10:13 PM
I have autotext entries that have field codes for easy editing. For example:

"Range of Motion: Normal"

In my document, the word "normal" is a field code that when edited may look like this

Range of Motion: -5 to 95

The edited text will be bold to stand out to the examiner that it is not normal.

Is there a way to set up a userform to have a drop down list to say the following:

exam shoulder
exam hand and wrist
exam knee
ect.

When one of the options are selected, it will place an associated autotext entry into the document with the field codes in place?

TonyJollans
12-06-2007, 11:50 PM
I'm sure it's possible but I'm not really sure what you want.

When an option is selected from your list (wherever it is) how do you determine what should go where?

And what do you mean by editing field codes?

kenparker23
12-07-2007, 06:11 AM
I would have the listbox linked to bookmarks in the document. I would have three or four listboxes.

Editing field codes is misleading. What I meant was, there are field codes embedded in my autotext.

TonyJollans
12-07-2007, 06:43 AM
I'm still struggling a little here.

You have a UserForm with a ListBox (let's just do one to start with :)) and when a selection is made from the Listbox you want an Autotext added at a Bookmark in a Document - and you then want some change made to the content inserted by the Autotext.

The change to be made to the autotext (the field code) is what exactly? And what type of field code is it?

kenparker23
12-07-2007, 06:50 AM
Sorry it is not clear Tony. Let me just start with one listbox. How can I get an autotext entry added at a bookmark in the document?

I'm not a programmer and it is difficult for me to explain. The autotext entry that I would like inserted has fields that I can edit based on a patients exam findings.

TonyJollans
12-07-2007, 06:56 AM
I'm trying to pin this down a bit because I'm wondering if an AutoTextList Field might be sufficient for your needs.

kenparker23
12-07-2007, 07:21 AM
Tony, I think you are right. I may have found an easy solution. Is there a way to edit the names of the actual autotext categories? Such as "closing" "header/footer".

TonyJollans
12-07-2007, 09:26 AM
I have to say that there's a lot about this all works that I really don't like but it can be useful if set up properly.

AutoTexts are grouped by a property called StyleName because they are nominally linked to Syles. However you can't change the StyleName of an existing Autotext entry - nor even directly query it. To change the style of an existing entry you have to delete and recreate it in the new style - if you have a lot to do and/or this is awkward for you, come back.