Fields reappear after they are unlinked when section break is remo

O

Olympian151

I have a written a short macro that unlinks fields located in the header,and
a second macro removes the last page in the document (a summary page for
routing). However, when the last page is removed, the unlinked fields in the
header return!

I have tracked the problem to the deletion of the Section Break (continuous)
..... does anybody know what the dynamic is that is causing this or how to fix
it?
Thanks!
 
J

Jay Freedman

Olympian151 said:
I have a written a short macro that unlinks fields located in the
header,and a second macro removes the last page in the document (a
summary page for routing). However, when the last page is removed,
the unlinked fields in the header return!

I have tracked the problem to the deletion of the Section Break
(continuous) .... does anybody know what the dynamic is that is
causing this or how to fix it?
Thanks!

The headers and footers of each section are actually stored in the section
break at the _end_ of that section. When you delete a section break, what
used to be the section controlled by that break becomes part of the section
that comes after it.

So what you're seeing is not the unlinked fields in the header returning --
those got wiped out when you deleted the section break -- but the previously
unseen fields in the header of the following section being revealed.

See http://www.word.mvps.org/FAQs/Formatting/WorkWithSections.htm for a
workaround.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
O

Olympian151

Jay, thank you! You link helped a lot.
I ended up writing at few lines that set the
Headers LinkToPrevious = True
when the first marco is ran to remove the fields.
thanks again!
Danny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top