Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
SV SV is offline
external usenet poster
 
Posts: 25
Default Linking to a Field

Greetings,
I've inherited a Word document in which a figure is shown on one page, and a
list of the parts that make it up is shown on the page.
The figure caption uses the SEQ field command:

SEQ Figure_6- \* ARABIC

And so each figure in this section shows up as 6-1, 6-2, etc. No problems
so far.
The parts list on the next page refers to the figure, so the parts list for
figure 6-2 would have, before each item, "6-2" Still no problems.

We had to add a figure in the early parts of the book and, since the figures
were all identified using the SEQ field command, they all updated without
problem.

The parts lists, however, had their figure numbers in as text, not a field,
so I'm looking at having to go down 70 pages of parts lists and updating
each line number with a new figure number. I can do a "Highlight the page,
do find/replace" 70 times but aside from being darned tedious, it'll have to
be repeated if we end up adding another figure.

I tried inserting a cross-reference, but none of them gave the option of
cross-referencing to the field in the figure.

Given the SEQ field command on each figure, is there a way I can link the
parts lists to that field so that when the figure number changes, the parts
list is updated with it? Is there a field for numbering I can add to the
figure (in the way of white, therefore invisible, text) that WILL take a
cross-reference?

I'm using Word 2003 sp2 in XP.

Thanks,
Shane


  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Linking to a Field

If you part numbers are of the form

6-2-1

6-2-2

6-2-3



The following macro would increment the digit between the - - by 1 (each
time it is run)



Dim srange As Range
Dim i As Long, j As Long
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="6-[0-9]{1,}-[0-9]{1,}",
MatchWildcards:=True, _
MatchCase:=False, Wrap:=wdFindStop, Forward:=True) = True
Set srange = Selection.Range.Duplicate
Selection.Collapse wdCollapseEnd
Selection.MoveRight wdCharacter, 1
With srange
i = InStr(.Text, "-")
j = InStrRev(.Text, "-")
.Text = Left(.Text, i) & Mid(.Text, i + 1, j - i - 1) + 1 &
Mid(.Text, j)
End With
Loop
End With


Save a copy of the document before running it.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"SV" wrote in message
...
Greetings,
I've inherited a Word document in which a figure is shown on one page, and
a list of the parts that make it up is shown on the page.
The figure caption uses the SEQ field command:

SEQ Figure_6- \* ARABIC

And so each figure in this section shows up as 6-1, 6-2, etc. No problems
so far.
The parts list on the next page refers to the figure, so the parts list
for figure 6-2 would have, before each item, "6-2" Still no problems.

We had to add a figure in the early parts of the book and, since the
figures were all identified using the SEQ field command, they all updated
without problem.

The parts lists, however, had their figure numbers in as text, not a
field, so I'm looking at having to go down 70 pages of parts lists and
updating each line number with a new figure number. I can do a "Highlight
the page, do find/replace" 70 times but aside from being darned tedious,
it'll have to be repeated if we end up adding another figure.

I tried inserting a cross-reference, but none of them gave the option of
cross-referencing to the field in the figure.

Given the SEQ field command on each figure, is there a way I can link the
parts lists to that field so that when the figure number changes, the
parts list is updated with it? Is there a field for numbering I can add
to the figure (in the way of white, therefore invisible, text) that WILL
take a cross-reference?

I'm using Word 2003 sp2 in XP.

Thanks,
Shane



  #3   Report Post  
Posted to microsoft.public.word.pagelayout
SV SV is offline
external usenet poster
 
Posts: 25
Default Linking to a Field

Doug,
I'm not sure if I've been clear. I'll try an example:

I have 20 parts, each of which is shown on figure 6-3 and 40 parts, each of
which is shown on figure 6-4.
The parts list for figure 6-3 shows, in the first column, nothing but 6-3's
and the parts list for 6-4 shows nothing but 6-4's.
This is as it should be.

Now, I insert a figure between them, which is automatically numbered as 6-4
(because of the SEQ command), and 6-4's figure number automatically updates
to 6-5.
Unfortunately, the parts list for the old 6-4 (now 6-5) still shows all
"6-4" as they're all TEXT not fields or anything.
I'm looking for a way to have the figure number identifiers on the parts
list follow the number of the figure if it changes.

Shane

"Doug Robbins - Word MVP" wrote in message
...
If you part numbers are of the form

6-2-1

6-2-2

6-2-3



The following macro would increment the digit between the - - by 1 (each
time it is run)



Dim srange As Range
Dim i As Long, j As Long
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="6-[0-9]{1,}-[0-9]{1,}",
MatchWildcards:=True, _
MatchCase:=False, Wrap:=wdFindStop, Forward:=True) = True
Set srange = Selection.Range.Duplicate
Selection.Collapse wdCollapseEnd
Selection.MoveRight wdCharacter, 1
With srange
i = InStr(.Text, "-")
j = InStrRev(.Text, "-")
.Text = Left(.Text, i) & Mid(.Text, i + 1, j - i - 1) + 1 &
Mid(.Text, j)
End With
Loop
End With


Save a copy of the document before running it.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"SV" wrote in message
...
Greetings,
I've inherited a Word document in which a figure is shown on one page,
and a list of the parts that make it up is shown on the page.
The figure caption uses the SEQ field command:

SEQ Figure_6- \* ARABIC

And so each figure in this section shows up as 6-1, 6-2, etc. No
problems so far.
The parts list on the next page refers to the figure, so the parts list
for figure 6-2 would have, before each item, "6-2" Still no problems.

We had to add a figure in the early parts of the book and, since the
figures were all identified using the SEQ field command, they all updated
without problem.

The parts lists, however, had their figure numbers in as text, not a
field, so I'm looking at having to go down 70 pages of parts lists and
updating each line number with a new figure number. I can do a "Highlight
the page, do find/replace" 70 times but aside from being darned tedious,
it'll have to be repeated if we end up adding another figure.

I tried inserting a cross-reference, but none of them gave the option of
cross-referencing to the field in the figure.

Given the SEQ field command on each figure, is there a way I can link the
parts lists to that field so that when the figure number changes, the
parts list is updated with it? Is there a field for numbering I can add
to the figure (in the way of white, therefore invisible, text) that WILL
take a cross-reference?

I'm using Word 2003 sp2 in XP.

Thanks,
Shane





  #4   Report Post  
Posted to microsoft.public.word.pagelayout
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Linking to a Field

Hi Sv,

I have 20 parts, each of which is shown on figure 6-3 and 40 parts, each of
which is shown on figure 6-4.
The parts list for figure 6-3 shows, in the first column, nothing but 6-3's
and the parts list for 6-4 shows nothing but 6-4's.
This is as it should be.

Now, I insert a figure between them, which is automatically numbered as 6-4
(because of the SEQ command), and 6-4's figure number automatically updates
to 6-5.
Unfortunately, the parts list for the old 6-4 (now 6-5) still shows all
"6-4" as they're all TEXT not fields or anything.
I'm looking for a way to have the figure number identifiers on the parts
list follow the number of the figure if it changes.

You can bookmark the entire figure number, then use a REF field instead of the
static "6-n" numbering for each part. For example, you can select the 6-4 text
then Insert/Bookmark. Type a descriptive name (Part_test, for example). Now
delete the 6-4 in front of a part designation, press Ctrl+F9 to insert field
brackets and type REF Part_test. Shift+F9 will hide the field code. From here
on, you can copy the field and paste it over the other numbers.

If you insert another set in front of the 6-4 information, once all the fields
in the document are updated (Ctrl+A, F9 will force this), all the Ref
Part_test fields will display 6-5, same as the Figure caption.

Another way to do this would be to use Insert/References/Cross reference but I
find that slower and less easy to maintain (the bookmark names are many-digit
numbers) than the "manual approach".

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

  #5   Report Post  
Posted to microsoft.public.word.pagelayout
SV SV is offline
external usenet poster
 
Posts: 25
Default Linking to a Field

Cindy,
Ah, I figured there had to be a way, thanks! Now to update the rest of the
document and use it in future documents!

Thanks,
Shane

"Cindy M." wrote in message
news:VA.00000997.007d7ba8@speedy...
Hi Sv,

I have 20 parts, each of which is shown on figure 6-3 and 40 parts, each
of
which is shown on figure 6-4.
The parts list for figure 6-3 shows, in the first column, nothing but
6-3's
and the parts list for 6-4 shows nothing but 6-4's.
This is as it should be.

Now, I insert a figure between them, which is automatically numbered as
6-4
(because of the SEQ command), and 6-4's figure number automatically
updates
to 6-5.
Unfortunately, the parts list for the old 6-4 (now 6-5) still shows all
"6-4" as they're all TEXT not fields or anything.
I'm looking for a way to have the figure number identifiers on the parts
list follow the number of the figure if it changes.

You can bookmark the entire figure number, then use a REF field instead of
the
static "6-n" numbering for each part. For example, you can select the 6-4
text
then Insert/Bookmark. Type a descriptive name (Part_test, for example).
Now
delete the 6-4 in front of a part designation, press Ctrl+F9 to insert
field
brackets and type REF Part_test. Shift+F9 will hide the field code. From
here
on, you can copy the field and paste it over the other numbers.

If you insert another set in front of the 6-4 information, once all the
fields
in the document are updated (Ctrl+A, F9 will force this), all the Ref
Part_test fields will display 6-5, same as the Figure caption.

Another way to do this would be to use Insert/References/Cross reference
but I
find that slower and less easy to maintain (the bookmark names are
many-digit
numbers) than the "manual approach".

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Date property in a form field mdavison Microsoft Word Help 13 October 6th 06 02:43 PM
Insert a bookmark field [email protected] Microsoft Word Help 4 September 26th 06 04:34 PM
Word: IF statement to merge a field only if another Field is popul HelenC Mailmerge 3 August 24th 06 10:33 AM
Linking "SaveDate" Field to another document Possomeye Microsoft Word Help 1 July 28th 05 05:38 AM
Text Form Field Ref in Footer Won't Update on Screen StarWine Microsoft Word Help 3 December 6th 04 07:17 PM


All times are GMT +1. The time now is 08:00 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"