Information générale
Catégorie:
COM/DCOM et OLE Automation
Seems instead of wdHeaderFooterPrimary you need Wdheaderfooterfirstpage.
>I am using the following code to add a header to my document.
>This works fine. However, I wish for this header to appear only on the first page of the document. I tried setting the DIFFERENTFIRSTPAGEHEADERFOOTER property to .t. and that made a difference except that it left the header off of the first page and put it on the subsequent pages. I want it to be just the opposite. Any ideas ?
>
>
>WITH oDoc.Sections.Last.Headers[wdHeaderFooterPrimary]
> .LinkToPrevious = .f.
> oHeaderRange = .Range()
> oHeaderRange.Text = ''
> oShape = oDoc.InlineShapes.AddPicture(ALLTRIM(sysvals.csr_logo),.f.,.t.,oHeaderRange)
> oShape.Height=sysvals.logo_h
> oShape.Width=sysvals.logo_w
> oHeaderRange.ParagraphFormat.Alignment=wdAlignParagraphLeft
> oHeaderRange.Collapse(wdCollapseEnd)
>ENDWITH
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement