H
hgoslin
Hi
I have cross referenced a bookmark to reflect the bookmarked text in a
header. The bookmark is in a cell in a table. I need only the
bookmarked text ie not the table cell to display in the header. Each
time I update fields the single cell table reappears in the header.
I have tried to write a macro that converts the table to text after
updating fields but the table reappears as soon as the Print Layout
view switches on.
Here is the code:
With ActiveDocument.Sections(4).Headers(wdHeaderFooterPrimary)
ActiveDocument.Sections(4).Headers(wdHeaderFooterPrimary).Range.Tables(1).Columns(1).Cells(1).Select
Selection.Rows.ConvertToText Separator:=wdSeparateByParagraphs, _
NestedTables:=True
End With
ActiveWindow.ActivePane.Close
If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPrintView
Else
ActiveWindow.View.Type = wdPrintView
End If
I would greatly appreciate help either to prevent the table showwing in
the first place or how to get rid of it in my header.
Thanks
Heather
I have cross referenced a bookmark to reflect the bookmarked text in a
header. The bookmark is in a cell in a table. I need only the
bookmarked text ie not the table cell to display in the header. Each
time I update fields the single cell table reappears in the header.
I have tried to write a macro that converts the table to text after
updating fields but the table reappears as soon as the Print Layout
view switches on.
Here is the code:
With ActiveDocument.Sections(4).Headers(wdHeaderFooterPrimary)
ActiveDocument.Sections(4).Headers(wdHeaderFooterPrimary).Range.Tables(1).Columns(1).Cells(1).Select
Selection.Rows.ConvertToText Separator:=wdSeparateByParagraphs, _
NestedTables:=True
End With
ActiveWindow.ActivePane.Close
If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPrintView
Else
ActiveWindow.View.Type = wdPrintView
End If
I would greatly appreciate help either to prevent the table showwing in
the first place or how to get rid of it in my header.
Thanks
Heather