Deleting an image in a header

S

Stephen English

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.
 
P

Perry

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
 
S

Stephen English

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

Perry said:
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
 

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