Insert a bookmark field

M

marcwentink

I am trying to insert a bookmark field in a document template. The
template I will use in a Delphi program. I am confused how I should
Insert such a field. The help is nog clear to me. It says:

============================================================
Insert a bookmark field
To print the information assigned to a bookmark by an ASK or SET field,
you must insert a bookmark field in the main document where you want
Microsoft Word to print the information.

In the main document, click where you want Word to print the
information.
Press CTRL+F9 to insert a pair of field characters ({ }).
Between the field characters, type the name of the bookmark you defined
in the SET or ASK field.
If the bookmark name is also the name of a Word field, type REF before
the bookmark name; for example, { REF Title }.
============================================================


I am confused about what should be: "the bookmark you defined in the
SET or ASK field". Should I do something before entering
ctrl-f9'myfieldname'?

If I open the document template I get the error message:

"Error! Bookmark not defined"

At the exact place I wanted to put my bookmark field.

Thanks in advance.
 
G

Graham Mayor

A bookmark is essentially stored information. You can reproduce the content
of that bookmark with a REF field. If the bookmark does not exist, you will
get an error message from the REF field.

Thus { SET myBookmark "Bookmark content" }
{ REF myBookmark }
or
{ ASK myOtherbookmark "Enter content of bookmark" }
{ REF myOtherbookmark }

If you need to trap the error because you are going to add the bookmark
later then

{ IF{ REF myBookmark } <> "Error!*" "{ Ref myBookmark }" }


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Shauna Kelly

Hi marcwentink

If you just want to create a bookmark, then select the text to be
bookmarked, and do Insert > Bookmark. Give it a name and press OK.

If you're trying to refer to the bookmark, then you just need a REF field.

Unless you want to use an ASK or SET field, don't worry about them.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
M

marcwentink

Shauna Kelly schreef:
If you just want to create a bookmark, then select the text to be
bookmarked, and do Insert > Bookmark. Give it a name and press OK.

That seems to work but should not I see the title/name of the bookmark
in my templatename.dot file?

I am asking this since I am working with an old template file were the
other bookmarks seems to be written as text in the file. I just do not
know if this is just written text added after adding the bookmark, or
if the name/title of the bookmark itself is displayed.

If in my own developped program change the text of the bookmark called
'mybookmrk', the 'mybookmrk' text is replaced though, so I think
somehow you can change the bookmark properties to write its name? I
have no way of finding out how the old file was made.
 
M

marcwentink

(e-mail address removed) schreef:

That seems to work but should not I see the title/name of the bookmark
in my templatename.dot file?

Ok you have to type a tekst, select it, copy it using contr-c, then add
the bookmark with instelf, bookmark, then 'retype' the name using
contr-v, and then add the bookmark....

Het maken van een bookmark

Selecteer text (dus als je een mailmerge veld vervangt, delete dat
veld, en schrijf de tekst opnieuw)
Kopieer de tekst met cntrl-C
Menu Insert
Submenu Bookmark
Maak een bookmark met de naam van de tekst die je zojuist gekopieerd
hebt, m.a.w. doe contrl-V
Add om een bookmark toe te voegen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top