E
Eva
I tried searching for a solution to this, but I haven't been able to
hit the magic string of key words that might hit on a solution. I have
a table that lists the subsection number, the heading text, and the
page number for each subsection. Right now I'm doing it manually by
putting the cursor in the first cell, inserting a cross reference to a
paragraph number, tabbing to the next cell, inserting a cross reference
to paragraph text, and tabbing to the next cell, then inserting a cross
reference to a page. I turned on macro record and generated these two
blind alleys:
Sub Paragraph_CF()
'
' Paragraph_CF Macro
' Macro recorded 8/2/2006 by whitlev
'
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="1",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="1",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="2", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="2",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="2",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="2", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="3",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="3",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="1",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="1",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
End Sub
And then I tried this:
Sub CF()
'
' CF Macro
' Macro recorded 8/2/2006 by whitlev
'
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="72", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="72",
InsertAsHyperlink:= _
True, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:= _
" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="72",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="73", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="73", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="73",
InsertAsHyperlink:= _
True, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:= _
" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="72",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
End Sub
But editing them to update from, say, "72" to "73" seems like it would
take longer than doing it manually. Surely someone else has had this
need before I did. Dare I hope there's a macro out there for this?
TIA--Eva Whitley
hit the magic string of key words that might hit on a solution. I have
a table that lists the subsection number, the heading text, and the
page number for each subsection. Right now I'm doing it manually by
putting the cursor in the first cell, inserting a cross reference to a
paragraph number, tabbing to the next cell, inserting a cross reference
to paragraph text, and tabbing to the next cell, then inserting a cross
reference to a page. I turned on macro record and generated these two
blind alleys:
Sub Paragraph_CF()
'
' Paragraph_CF Macro
' Macro recorded 8/2/2006 by whitlev
'
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="1",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="1",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="2", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="2",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="2",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="2", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="3",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="3",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="1",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="1",
InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
End Sub
And then I tried this:
Sub CF()
'
' CF Macro
' Macro recorded 8/2/2006 by whitlev
'
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="72", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="72",
InsertAsHyperlink:= _
True, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:= _
" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="72",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="73", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="73", _
InsertAsHyperlink:=True, IncludePosition:=False,
SeparateNumbers:=False, _
SeparatorString:=" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdContentText, ReferenceItem:="73",
InsertAsHyperlink:= _
True, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:= _
" "
Selection.MoveRight Unit:=wdCell
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdPageNumber, ReferenceItem:="72",
InsertAsHyperlink:=True _
, IncludePosition:=False, SeparateNumbers:=False,
SeparatorString:=" "
End Sub
But editing them to update from, say, "72" to "73" seems like it would
take longer than doing it manually. Surely someone else has had this
need before I did. Dare I hope there's a macro out there for this?
TIA--Eva Whitley