PDA

View Full Version : A REF FIELD INSIDE A BOOKMARK



Greg
09-30-2007, 03:05 AM
Hi all,

Does anyone know whether it's possible to insert a particular bookmark's ref field into the text of another bookmark?

I insert text into my document via a userform. In one textbox I insert text that I want to appear in a bookmark on my document but I want that same text inserted into the text of another bookmark on the document.

If I use a ref field for this, the ref field disappears after one use only, and the text can't be changed via userform following that initial use.

I expect that there is a simple solution to this problem and any help would be greatly appreciated.

Regards,

Greg.

fumei
09-30-2007, 05:43 AM
Post some code.

Greg
09-30-2007, 07:07 PM
Hi Gerry,

The relevant document is attached. This is the same kind of document in which I had tried to add numbering to text via the userform. That problem remains unsolved.

The current problem also relates to input text. In the attached document I have added a ref field in the "indorsement" to show the "amount" for which a bookmark and ref field appears elswhere in the document.

If you bring up the userform and alter the "amount" in the text box of that name and press OK, the amount will be correctly entered into the relevant bookmark and ref fields but the ref field in the indorsement will disappear leaving only the altered amount.

Therefore, the amount in the "indorsement" can only be altered once by this method.

However, the "amount" bookmark and ref field elsewhere in the document continue to function normally.

Do you have any ideas?

Regards,

Greg.

TonyJollans
10-01-2007, 02:34 AM
The reason for your problem is that you have both the Amount and the Indorsement on the UserForm. As you cannot maintain the REF field on the Userform you are bound to lose it when you update the Indorsement bookmark.

If you know you always want to keep the REF field you could perhaps have separate before and after texts on the Userform or you could try and analyse the whole text to identify where the amount should be. But if you may or may not want the amount repeated in the indorsement or there may or may not be other amounts mentioned you could run into a real mess.