I have a memo template with the company logo on the first page in a header
and nothing in the footer. If the memo goes more than one page, from page 2
to the end have no header, but do have a footer with the page number and a
smaller company logo. Because of this, First Page Different is checked off
in Page Setup. Some people want to be able to insert a landscape table page
into the middle of the document. When they section off the document to add
these pages, the logo from the first page is displayed on their page. I am
trying to create a macro to help the staff that are trying to do this, by
having the macro insert the landscape page with the footer that is on all of
the pages other than the first page (the page number and smaller logo),
followed by a portrait page so they will be ready to type again. However, I
cannot get the macro to stop putting in the logo from the first page, even
though I have .DifferentFirstPageHeaderFooter = False. I only know how to
create macros by example, so this is difficult for me. I hope you can help,
because I've tried everything. Thank you for your time.

Re: Trouble with First Page Different in a Word Document Macro by Doug

Doug
Tue Nov 20 18:16:03 PST 2007

The code that you would need to prevent the header from the first page of
the document appearing on the first page of the landscape section would be

With Selection.Sections(1).Headers(wdHeaderFooterFirstPage)
.LinkToPrevious = False
.Range.Delete
End With

The selection must be in the landscape page when that macro is run.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Cathy DeMaggio" <cdemaggio@camsys.com> wrote in message
news:%23d9bhB7KIHA.748@TK2MSFTNGP04.phx.gbl...
>I have a memo template with the company logo on the first page in a header
>and nothing in the footer. If the memo goes more than one page, from page
>2 to the end have no header, but do have a footer with the page number and
>a smaller company logo. Because of this, First Page Different is checked
>off in Page Setup. Some people want to be able to insert a landscape table
>page into the middle of the document. When they section off the document
>to add these pages, the logo from the first page is displayed on their
>page. I am trying to create a macro to help the staff that are trying to
>do this, by having the macro insert the landscape page with the footer that
>is on all of the pages other than the first page (the page number and
>smaller logo), followed by a portrait page so they will be ready to type
>again. However, I cannot get the macro to stop putting in the logo from
>the first page, even though I have .DifferentFirstPageHeaderFooter = False.
>I only know how to create macros by example, so this is difficult for me.
>I hope you can help, because I've tried everything. Thank you for your
>time.
>



Re: Trouble with First Page Different in a Word Document Macro by Cathy

Cathy
Wed Nov 21 07:45:31 PST 2007

Doug -- Thank you for getting back to me so quickly. I tried the macro and
it works the first time, but not when I need to use it again. For instace,
you have a few pages of text then section the document off for a landscape
page (which I have in autotext), run the macro and it works by removing the
first page header from the page you are on. But, if you type some more
pages and then need to add another landscape table page, when you use the
macro again, it goes back to the previous section and puts the first page
header in it. The new section doesn't have the header, which is what you
want, but we don't want it to go back to the last section and add it in
again. Only the first section should have that first header, then all other
sections have no header, but from page 2 on there is a footer with a page
number and smaller logo. Do you know why this is happening?
"Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
news:utNt7R%23KIHA.1324@TK2MSFTNGP06.phx.gbl...
> The code that you would need to prevent the header from the first page of
> the document appearing on the first page of the landscape section would be
>
> With Selection.Sections(1).Headers(wdHeaderFooterFirstPage)
> .LinkToPrevious = False
> .Range.Delete
> End With
>
> The selection must be in the landscape page when that macro is run.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Cathy DeMaggio" <cdemaggio@camsys.com> wrote in message
> news:%23d9bhB7KIHA.748@TK2MSFTNGP04.phx.gbl...
>>I have a memo template with the company logo on the first page in a header
>>and nothing in the footer. If the memo goes more than one page, from page
>>2 to the end have no header, but do have a footer with the page number and
>>a smaller company logo. Because of this, First Page Different is checked
>>off in Page Setup. Some people want to be able to insert a landscape
>>table page into the middle of the document. When they section off the
>>document to add these pages, the logo from the first page is displayed on
>>their page. I am trying to create a macro to help the staff that are
>>trying to do this, by having the macro insert the landscape page with the
>>footer that is on all of the pages other than the first page (the page
>>number and smaller logo), followed by a portrait page so they will be
>>ready to type again. However, I cannot get the macro to stop putting in
>>the logo from the first page, even though I have
>>.DifferentFirstPageHeaderFooter = False. I only know how to create macros
>>by example, so this is difficult for me. I hope you can help, because I've
>>tried everything. Thank you for your time.
>>
>
>



Re: Trouble with First Page Different in a Word Document Macro by Doug

Doug
Wed Nov 21 11:38:33 PST 2007

Where was the selection when you ran it?

You could try the following modification:

With Selection.Sections(1).Headers(wdHeaderFooterFirstPage)
If .LinkToPrevious = True then
.LinkToPrevious = False
.Range.Delete
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Cathy DeMaggio" <cdemaggio@camsys.com> wrote in message
news:et3wOWFLIHA.3516@TK2MSFTNGP02.phx.gbl...
> Doug -- Thank you for getting back to me so quickly. I tried the macro
> and it works the first time, but not when I need to use it again. For
> instace, you have a few pages of text then section the document off for a
> landscape page (which I have in autotext), run the macro and it works by
> removing the first page header from the page you are on. But, if you type
> some more pages and then need to add another landscape table page, when
> you use the macro again, it goes back to the previous section and puts the
> first page header in it. The new section doesn't have the header, which
> is what you want, but we don't want it to go back to the last section and
> add it in again. Only the first section should have that first header,
> then all other sections have no header, but from page 2 on there is a
> footer with a page number and smaller logo. Do you know why this is
> happening?
> "Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
> news:utNt7R%23KIHA.1324@TK2MSFTNGP06.phx.gbl...
>> The code that you would need to prevent the header from the first page of
>> the document appearing on the first page of the landscape section would
>> be
>>
>> With Selection.Sections(1).Headers(wdHeaderFooterFirstPage)
>> .LinkToPrevious = False
>> .Range.Delete
>> End With
>>
>> The selection must be in the landscape page when that macro is run.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "Cathy DeMaggio" <cdemaggio@camsys.com> wrote in message
>> news:%23d9bhB7KIHA.748@TK2MSFTNGP04.phx.gbl...
>>>I have a memo template with the company logo on the first page in a
>>>header and nothing in the footer. If the memo goes more than one page,
>>>from page 2 to the end have no header, but do have a footer with the page
>>>number and a smaller company logo. Because of this, First Page Different
>>>is checked off in Page Setup. Some people want to be able to insert a
>>>landscape table page into the middle of the document. When they section
>>>off the document to add these pages, the logo from the first page is
>>>displayed on their page. I am trying to create a macro to help the staff
>>>that are trying to do this, by having the macro insert the landscape page
>>>with the footer that is on all of the pages other than the first page
>>>(the page number and smaller logo), followed by a portrait page so they
>>>will be ready to type again. However, I cannot get the macro to stop
>>>putting in the logo from the first page, even though I have
>>>.DifferentFirstPageHeaderFooter = False. I only know how to create macros
>>>by example, so this is difficult for me. I hope you can help, because
>>>I've tried everything. Thank you for your time.
>>>
>>
>>
>
>



Re: Trouble with First Page Different in a Word Document Macro by Cathy

Cathy
Tue Nov 27 11:47:25 PST 2007

Thank you, Doug, this worked!
"Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
news:O2LAeYHLIHA.5764@TK2MSFTNGP06.phx.gbl...
> Where was the selection when you ran it?
>
> You could try the following modification:
>
> With Selection.Sections(1).Headers(wdHeaderFooterFirstPage)
> If .LinkToPrevious = True then
> .LinkToPrevious = False
> .Range.Delete
> End If
> End With
>
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Cathy DeMaggio" <cdemaggio@camsys.com> wrote in message
> news:et3wOWFLIHA.3516@TK2MSFTNGP02.phx.gbl...
>> Doug -- Thank you for getting back to me so quickly. I tried the macro
>> and it works the first time, but not when I need to use it again. For
>> instace, you have a few pages of text then section the document off for a
>> landscape page (which I have in autotext), run the macro and it works by
>> removing the first page header from the page you are on. But, if you
>> type some more pages and then need to add another landscape table page,
>> when you use the macro again, it goes back to the previous section and
>> puts the first page header in it. The new section doesn't have the
>> header, which is what you want, but we don't want it to go back to the
>> last section and add it in again. Only the first section should have
>> that first header, then all other sections have no header, but from page
>> 2 on there is a footer with a page number and smaller logo. Do you know
>> why this is happening?
>> "Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
>> news:utNt7R%23KIHA.1324@TK2MSFTNGP06.phx.gbl...
>>> The code that you would need to prevent the header from the first page
>>> of the document appearing on the first page of the landscape section
>>> would be
>>>
>>> With Selection.Sections(1).Headers(wdHeaderFooterFirstPage)
>>> .LinkToPrevious = False
>>> .Range.Delete
>>> End With
>>>
>>> The selection must be in the landscape page when that macro is run.
>>>
>>> --
>>> Hope this helps.
>>>
>>> Please reply to the newsgroup unless you wish to avail yourself of my
>>> services on a paid consulting basis.
>>>
>>> Doug Robbins - Word MVP
>>>
>>> "Cathy DeMaggio" <cdemaggio@camsys.com> wrote in message
>>> news:%23d9bhB7KIHA.748@TK2MSFTNGP04.phx.gbl...
>>>>I have a memo template with the company logo on the first page in a
>>>>header and nothing in the footer. If the memo goes more than one page,
>>>>from page 2 to the end have no header, but do have a footer with the
>>>>page number and a smaller company logo. Because of this, First Page
>>>>Different is checked off in Page Setup. Some people want to be able to
>>>>insert a landscape table page into the middle of the document. When
>>>>they section off the document to add these pages, the logo from the
>>>>first page is displayed on their page. I am trying to create a macro to
>>>>help the staff that are trying to do this, by having the macro insert
>>>>the landscape page with the footer that is on all of the pages other
>>>>than the first page (the page number and smaller logo), followed by a
>>>>portrait page so they will be ready to type again. However, I cannot
>>>>get the macro to stop putting in the logo from the first page, even
>>>>though I have .DifferentFirstPageHeaderFooter = False. I only know how
>>>>to create macros by example, so this is difficult for me. I hope you can
>>>>help, because I've tried everything. Thank you for your time.
>>>>
>>>
>>>
>>
>>
>
>