I have a letterhead template with a logo in the header.
I have a userform which captures details including whether they want to
print it or send it electronically. If they want to print it, I need to
delete the logo (we print on preprinted stationery).

THe image can be either direct in the header or in a table in the header but
I want to keep the header the same depth if the image is delated so a two
cell table with paragraph marks in one cell and the image in the other would
seem to be the easiest. All contact details are in the right margin.

Has anyone any ideas on code that will do it easily - it's a first page
header - I always get confused with story ranges.
--
Regards
Stephen English

Re: Deleting an image in a header by Perry

Perry
Thu Dec 15 02:51:48 CST 2005

Below example includes a boolean variable [PrintLogo] indicating the type of
companypaper users need to print on

If PrintLogo = False Then
Dim r As Range
Set r = ActiveDocument.StoryRanges(10)
r.InlineShapes(1).Delete
End If

10 = wdFirstPageHeaderStory
-------------------------------------
Krgrds,
Perry

"Stephen English" <senglishdonotspam55@discussions.microsoft.com> wrote in
message news:11554F1A-DFCD-4ECE-B2E9-4CA499DD7886@microsoft.com...
>I have a letterhead template with a logo in the header.
> I have a userform which captures details including whether they want to
> print it or send it electronically. If they want to print it, I need to
> delete the logo (we print on preprinted stationery).
>
> THe image can be either direct in the header or in a table in the header
> but
> I want to keep the header the same depth if the image is delated so a two
> cell table with paragraph marks in one cell and the image in the other
> would
> seem to be the easiest. All contact details are in the right margin.
>
> Has anyone any ideas on code that will do it easily - it's a first page
> header - I always get confused with story ranges.
> --
> Regards
> Stephen English



Re: Deleting an image in a header by StephenEnglish

StephenEnglish
Thu Dec 15 17:55:03 CST 2005

Hi Perry
Thank you - so simple when you don't have a mental block!
Merry Christmas
Stephen

"Perry" wrote:

> Below example includes a boolean variable [PrintLogo] indicating the type of
> companypaper users need to print on
>
> If PrintLogo = False Then
> Dim r As Range
> Set r = ActiveDocument.StoryRanges(10)
> r.InlineShapes(1).Delete
> End If
>
> 10 = wdFirstPageHeaderStory
> -------------------------------------
> Krgrds,
> Perry
>
> "Stephen English" <senglishdonotspam55@discussions.microsoft.com> wrote in
> message news:11554F1A-DFCD-4ECE-B2E9-4CA499DD7886@microsoft.com...
> >I have a letterhead template with a logo in the header.
> > I have a userform which captures details including whether they want to
> > print it or send it electronically. If they want to print it, I need to
> > delete the logo (we print on preprinted stationery).
> >
> > THe image can be either direct in the header or in a table in the header
> > but
> > I want to keep the header the same depth if the image is delated so a two
> > cell table with paragraph marks in one cell and the image in the other
> > would
> > seem to be the easiest. All contact details are in the right margin.
> >
> > Has anyone any ideas on code that will do it easily - it's a first page
> > header - I always get confused with story ranges.
> > --
> > Regards
> > Stephen English
>
>
>