Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different types of Bookmarks are confusing...

Status
Not open for further replies.

swingkyd

Programmer
Jul 10, 2003
34
CA
Hello,
I have been using VBA for about a month now and I've noticed something interesting about bookmarks and fields. Maybe someone can explain it to me. I've read the pertinent documentation but it doesn't seem to clear up my questions.

What is the difference between a bookmark that is created by:
1)
Code:
 Insert->bookmark [\code] (then use say "new")

versus a Field that is created like this:
2)
[code]
{SET new "new bookmark"}
[\code]

I've noticed that the two behave differently. 

A) When the first method is used, the code doesn't seem to be accessible. I can't edit the code for that bookmark. If I place the bookmark before text, they both seem to react to "GoTo" calls the same... but with the first one, I can select a whole table or a cell and create a bookmark that attaches itself to the table or cell itself... not just the text within the cell or table.
How is the code written for attaching a bookmark to a cell or a table?

B)With the [code]{SET new "new bookmark"} [\code] method I don't even have to set a value of "new"... I can leave it blank so long as I at some time set a value to "new". This doesn't seem to be the same as the [code]Insert-> bookmark [\code] as the value of the bookmark doesn't seem mean anything. 
I cannot reference the latter using the [code]{REF new}[\code] field.

Can anybody help clear this up with me? I'm really confused as to why they would be so different. It would be useful to me as I'm trying to clean up a document i've started a while ago when I wasn't very proficient with VBA or Word.

Maybe another way to put it is how can insert a bookmark by using the [code] {....} [\code] fields? is that possible?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top