Template Question - Word 2003

N

Nadihaha

Hi More knowing beings than me,

I currently have a template in Word 2003 that is a work in progress. I
currently have a table version history in it, which has a macro in it to add
a new line when you tab off the end. The entries in this table are all
bookmarked and I have cross-references to these values to autopopulate other
fields in my template.

Is there a way that when values are added in the new line (or even when it's
created) I can move the bookmarks into the new line or automatically update
all the cross-references to access the new line?

Many Thanks
 
T

That Guy

Hi More knowing beings than me,

I currently have a template in Word 2003 that is a work in progress. I
currently have a table version history in it, which has a macro in it to add
a new line when you tab off the end. The entries in this table are all
bookmarked and I have cross-references to these values to autopopulate other
fields in my template.

Is there a way that when values are added in the new line (or even when it's
created) I can move the bookmarks into the new line or automatically update
all the cross-references to access the new line?

Many Thanks

well if you are auto populating based on the name of a filed then the
only solution I can think of is to add a bookmark to the range of the
newly created cells when they are created and then change the names of
all the old ones, so that the name of the new one, can become the name
you have already referenced. That would be the hard and intense way.

the other way would be to populate using a vba macro and then you
could use a variable as the name of the bookmark to update from. That
way you could name the new bookmarks whatever you want and not have to
change a million references.

either way you want to try thre is a way to do it, but it is going to
require more code.

for example in your macro to auto create the new line of cells:

ActiveDocument.Tables(the index of the table you are updating).cells
(the row,thecolumn).range.bookmarks.add "NewBookmarkName"

CrossReferenceNameToUse = "NewBookmarkName"

then all you need to do is loop through your bookmarks that are being
auto populated and update them with the new reference.

Hope that is helpful.
 

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