A
Associates
Hi,
I was trying to insert an autotexts to a word report document and make sure
the footer is linked to the previous in VBA but can't seem to get it to work.
I have a template designed for Appendix and have set it up as an autotexts.
When user would like to insert an Appendix to the report, he/she just presses
a button (in macro) to insert it. My problem here is when the Appendix
autotexts is added, i want the footer to be linked to the previous page so
that i could get the numbering system to display on the appendix page.
I tried the following code (obtained from macro recorder) but it didn't work
ActiveDocument.AttachedTemplate.AutoTextEntries("appendix").Insert _
Where:=Selection.Range, RichText:=True
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
Selection.HeaderFooter.LinkToPrevious = Not Selection.HeaderFooter. _
LinkToPrevious
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Thank you in advance
I was trying to insert an autotexts to a word report document and make sure
the footer is linked to the previous in VBA but can't seem to get it to work.
I have a template designed for Appendix and have set it up as an autotexts.
When user would like to insert an Appendix to the report, he/she just presses
a button (in macro) to insert it. My problem here is when the Appendix
autotexts is added, i want the footer to be linked to the previous page so
that i could get the numbering system to display on the appendix page.
I tried the following code (obtained from macro recorder) but it didn't work
ActiveDocument.AttachedTemplate.AutoTextEntries("appendix").Insert _
Where:=Selection.Range, RichText:=True
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
Selection.HeaderFooter.LinkToPrevious = Not Selection.HeaderFooter. _
LinkToPrevious
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Thank you in advance