Hi Doug,
It is for a Quote template. Ther quote is always ptinted and sometimes
e-mailed after printing. That means that the user has to remove the logo
always. When I isertt a logo whith a macro the only have to do that when they
want to e-mail the PDF.
Thanks for your reply.
Regards,
Jan
"Doug Robbins - Word MVP" wrote:
> Your code is just adding a picture to the FirstPage header area.
>
> I would repeat my suggestion that you manually set up the headers in the
> template and then use code to delete content from them when it is not
> required.
>
> --
> 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
>
> "JN"
> news:6BC052C4-C134-433E-9543-34714271383D@microsoft.com...
> > Hi Jean-Guy,
> >
> > Thank you for your reply. Your right about the first line so I changed it
> > from true to false. IN word 2007 the logo is inserted on all pages but in
> > 2003 the logo is not inserted anymore.
> >
> > I also tried this code:
> >
> > Sub logoIneerstePagina()
> > With ActiveDocument
> > .Sections(1).Headers(wdHeaderFooterFirstPage).Shapes.AddPicture
> > "C:\kanweg\logo copy.gif"
> > With .Sections(1).Headers(wdHeaderFooterFirstPage).Shapes(1)
> > .Height = CentimetersToPoints(3#)
> > .Width = CentimetersToPoints(6)
> > .Left = CentimetersToPoints(10)
> > .Top = CentimetersToPoints(0#)
> > End With
> > End With
> > End Sub
> >
> > In Word 2007 the logo is inserted on all pages but in Word 2003 on just
> > one
> > page.
> >
> > All you other questions the answer is no.
> >
> > So my problem is that for 2007 the code seems to be ok but I need it also
> > to
> > run in 2003. Maybe you want to take a look again?
> >
> > Thank you.
> > Regards
> > Jan
> >
> > "Jean-Guy Marcil" wrote:
> >
> >> "JN" wrote:
> >>
> >> > Hi,
> >> >
> >> > For printing on paper witch already has the company logo and for
> >> > e-mailing I
> >> > use this macro which is triggered manualy.
> >> > It places the logo in the header of the first page but I would like the
> >> > logo
> >> > to be added to the header of all pages. I use Word 2003.
> >> >
> >> > Sub logoIneerstePagina()
> >> >
> >> > With ActiveDocument
> >> > .PageSetup.DifferentFirstPageHeaderFooter = True
> >> > .Sections(1).Headers(wdHeaderFooterFirstPage).Shapes.AddPicture
> >> > "C:\kanweg\logo copy.gif"
> >> > With .Sections(1).Headers(wdHeaderFooterFirstPage).Shapes(1)
> >> > .Height = CentimetersToPoints(3#)
> >> > .Width = CentimetersToPoints(6)
> >> > .Left = CentimetersToPoints(10)
> >> > .Top = CentimetersToPoints(1#)
> >> > End With
> >> > End With
> >> > End Sub
> >> >
> >> > Help would be very appreciated.
> >> > Thanks
> >>
> >> Might be easier said than done, depending on the document types you want
> >> this code to run on...
> >>
> >> First of all, your code creates the logo on the first page only on
> >> ppurpose
> >> because of the lines:
> >> .PageSetup.DifferentFirstPageHeaderFooter = True
> >> .Sections(1).Headers(wdHeaderFooterFirstPage).Shapes.AddPicture
> >> "C:\kanweg\logo copy.gif"
> >> Why is your code making sure that the fst page is different if ythis is
> >> not
> >> what oyu want?
> >>
> >> Shouldn't it be more like:
> >> .PageSetup.DifferentFirstPageHeaderFooter = False
> >> .Sections(1).Headers(wdHeaderFooterPrimary).Shapes.AddPicture
> >> "C:\kanweg\logo copy.gif"
> >>
> >> ???
> >>
> >> But the most important point is this:
> >> Will some of the documents have more than one section already in place
> >> when
> >> the code runs?
> >> If not, nevermind, your code is fine.
> >> If so, will some of these sections have their header not linked to the
> >> previous header?
> >> If not, nevermind, your code is fine.
> >> If so, you will need code to address this point, this is where it gets a
> >> wee
> >> bit more complicated...
>
>
>