Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jeff
 
Posts: n/a
Default Linking a figure number to a reference in the text

I think I used to know how to do this, but no longer remember.

In a text I am writing, I would occasionally write "Fig x" referring to an
illustration somewhere in the text. I believe there is a way to link that
reference to the image I am referring to so that should that Figure number
later change, the reference in the text would also correct itself
automatically. I only want the text reference to show the figure number, not
the rest of the caption text description.

How is that done?

Thanks.

--

Jeff Stevens
Email address deliberately false to avoid spam





  #2   Report Post  
WordBanter AI WordBanter AI is offline
Word Super Guru
 
Posts: 1,200
Thumbs up Answer: Linking a figure number to a reference in the text

Steps to link a figure number to a reference in Microsoft Word:
  1. Insert the figure and add a caption with the figure number by selecting the figure, going to the "References" tab, clicking "Insert Caption", and adding the caption text.
  2. Place the cursor where you want to insert the cross-reference in the text.
  3. Go to the "References" tab and click "Cross-reference".
  4. In the "Reference type" dropdown, select "Figure".
  5. In the "Insert reference to" dropdown, select "Only label and number".
  6. In the "For which caption" dropdown, select the caption that corresponds to the figure you want to reference.
  7. Click "Insert" to add the cross-reference to your document.

To update the cross-reference if the figure number changes, simply right-click on the cross-reference and select "Update Field".

PHP Code:
Sub Example()
    
'This example inserts a caption and a cross-reference to a figure in a Word document.
    Dim objFigure As Word.Shape
    Dim objCaption As Word.CaptionLabel
    Dim objRange As Word.Range
    Dim objRef As Word.Field
    
    '
Insert the figure and add a caption
    Set objFigure 
ActiveDocument.Shapes.AddPicture("C:\Users\Public\Pictures\Sample Pictures\Desert.jpg"FalseTrue00, -1, -1)
    
Set objCaption ActiveDocument.CaptionLabels.Add(Name:="Figure")
    
objFigure.Select
    Selection
.InsertCaption Label:=objCaption.NameTitleAutoText:=""Title:=""Position:=wdCaptionPositionBelowExcludeLabel:=0
    
    
'Insert the cross-reference
    Set objRange = ActiveDocument.Content
    objRange.Collapse Direction:=wdCollapseEnd
    objRange.InsertParagraphAfter
    objRange.Collapse Direction:=wdCollapseEnd
    Set objRef = objRange.Fields.Add(Range:=objRange, Type:=wdFieldRef, Text:="Figure \ref Figure1", PreserveFormatting:=False)
End Sub 
__________________
I am not human. I am a Microsoft Word Wizard
  #3   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

Insert | Cross-reference (Insert | Reference | Cross-reference in Word
2002/2003).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jeff" wrote in message
...
I think I used to know how to do this, but no longer remember.

In a text I am writing, I would occasionally write "Fig x" referring to an
illustration somewhere in the text. I believe there is a way to link that
reference to the image I am referring to so that should that Figure number
later change, the reference in the text would also correct itself
automatically. I only want the text reference to show the figure number,

not
the rest of the caption text description.

How is that done?

Thanks.

--

Jeff Stevens
Email address deliberately false to avoid spam






  #5   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

No, REF fields don't update automatically. You have to Ctrl+A, F9 to update
them.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jeff" wrote in message
...
Thanks.

I hope I have not accidentally turned off automatic updating of these
fields. I ask because I notice that when I move an image, the figure

number
does not update "automatically" unless I click on it and specifically ask

it
to "update". Should this update not happen automatically when the order

of
the images change?

--

Jeff Stevens
Email address deliberately false to avoid spam




Suzanne S. Barnhill wrote:
Insert | Cross-reference (Insert | Reference | Cross-reference in Word
2002/2003).


"Jeff" wrote in message
...
I think I used to know how to do this, but no longer remember.

In a text I am writing, I would occasionally write "Fig x" referring
to an illustration somewhere in the text. I believe there is a way
to link that reference to the image I am referring to so that should
that Figure number later change, the reference in the text would
also correct itself automatically. I only want the text reference to
show the figure number, not the rest of the caption text description.

How is that done?

Thanks.

--

Jeff Stevens
Email address deliberately false to avoid spam






  #6   Report Post  
Daiya Mitchell
 
Posts: n/a
Default

Actually, no. Cross-reference fields do not automatically update. However,
you can update all fields at once by selecting all, then hitting F9.
Actually, I'm not totally sure you need to select all first.


On 4/28/05 6:01 PM, "Jeff" wrote:

Thanks.

I hope I have not accidentally turned off automatic updating of these
fields. I ask because I notice that when I move an image, the figure number
does not update "automatically" unless I click on it and specifically ask it
to "update". Should this update not happen automatically when the order of
the images change?


--
Daiya Mitchell, MVP Mac/Word
Word FAQ: http://www.word.mvps.org/
MacWord Tips: http://www.word.mvps.org/MacWordNew/
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/

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
cross reference that includes both the heading number and the text mike Microsoft Word Help 4 May 13th 23 02:49 AM
Cross reference - text to figure to text K singh Microsoft Word Help 0 April 14th 05 02:53 PM
How do I get rid of a page number on a Save As\ Text Only doc? Mike Whitehurst Microsoft Word Help 2 March 24th 05 01:17 PM
Any way to link text with Figure or Table number? Richard Stanford Microsoft Word Help 1 January 4th 05 02:32 PM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM


All times are GMT +1. The time now is 05:38 AM.

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"