Footer : Test if Exists

M

mouff

Hi,

I need to delete all footers in a document. So i do :
Sections(1).Footers(1).Range.Characters(1).Delete for
example.
But, when i delete a footer, Word re-create a new footer
with char(13) as value. ARghhh, beacuse for a page totaly
full, it can broke the presentation :(.

In fact, i delete all time footers without test if there
is a footer...then, if i delete a footer which don't
exists, Word re-create too a footer with chr(13)...so my
presentation is broken :( if the page is full.

So, i need to test if there is a footer. So How ?
I do : ?asc(activedocument.Sections(1).Footers
(1).Range.Text) to test the value and know if there is a
footer. Ok...But, if there is not a footer, Word, to
answer me, create a footer with chr(13) !
I do a 'Get' and Word do a 'Set' !!!! Arggggggggggggggggg
Why ????

So, i can't test if a footer exists without to start an
action of creation...

U can help me ? i am totaly lost...
Thx for help

Mouff
 
D

Doug Robbins - Word MVP

Hi Mouff,

Try using

ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Font.Hidden
= True

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP
 
D

Doug Robbins - Word MVP

Hi Mouff,

If you click on the Show/Hide ¶ button you should not see the ¶ in the
footer.

Also under Tools>Options>Print, make sure that Hidden text is unchecked.

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP
 
M

Mouff

The first point don't resolve my problem to presentation
broken...Ok, i don't see chr(13), but my text is ever
shift...

For the second point, it is a good idea, but, i need to
print some other hidden text. So, i can't use this
solution :(

Thx for help, but, i am again lost ;(

Mouff
-----Original Message-----
Hi Mouff,

If you click on the Show/Hide ¶ button you should not see
the ¶ in the
footer.

Also under Tools>Options>Print, make sure that Hidden text
is unchecked.

Please respond to the newsgroups for the benefit of others
who may be
interested.
 
C

Cindy Meister -WordMVP-

Hi Mouff,
I need to delete all footers in a document. So i do :
Sections(1).Footers(1).Range.Characters(1).Delete for
example.
But, when i delete a footer, Word re-create a new footer
with char(13) as value. ARghhh, beacuse for a page totaly
full, it can broke the presentation :(.
1) There's no way to remove this from a header or footer,
once the header/footer range has been "activated". It's
there to stay.

2) Why don't you simply reduce the size of the footer area
(File/PageSetup/Margins). Make it smaller, if it's
interfering with how the text is breaking?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
C

Cindy Meister -WordMVP-

Hi Marie,
Do you know of the programmers know that this is impossible to do (I have
the same problem and there are almost any margins... arrrggg!!!) and if they
plan to make the option to remove them?
No idea. But I rather suspect that the Word team has things it places higher
on their priority list. However, I think there's a place on microsoft.com
where you can voice your wishes/feedback. Tell 'em it's a bother. If enough
people do that, they'll look at it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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