Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automation - Graphics in header
Message
De
24/07/2002 13:45:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Word Automation - Graphics in header
Divers
Thread ID:
00682166
Message ID:
00682166
Vues:
61
Below is my attempt at putting a picture and some text into a header of a Word Document. What I have works. However, it does not generate the desired affect. What I wish to create is a header in which the graphic is left justified and the text is right justified. It is further complicated by the fact that part of the text ("Executive Summary") is to be on the same line as the Graphic. The dotted line and the "plans.customer" will be below the graphic. In the model created through word, the text "Executive Summary" is contained within a Textbox so we can move it anywhere we wish.
I tried to figure out how to insert a text box but have yet to be able to do that. Any help would be appreciated. Thanks.



oHeader = oDoc.Sections.Last.Headers[WdHeaderFooterPrimary]
oHeader.LinkToPrevious = .F.
oHeaderRange = oHeader.Range()
oHeaderRange.Text = ""
oShape = oDoc.InlineShapes.AddPicture("F:\SOMEPLACE\LOGOS\LOGO_CSR_BLACK.BMP",.f.,.t.,oHeaderRange)
oShape.Height = 45
oShape.Width = 95
oHeaderRange.InsertAfter("Executive Summary")
oHeaderRange.InsertAfter(CR)
oHeaderRange.InsertAfter("--------------------------------------------------------------------------------------------")
oHeaderRange.InsertAfter(CR)
oHeaderRange.InsertAfter(ALLTRIM(plans.customer))
oHeaderRange.ParagraphFormat.Alignment = wdAlignParagraphRight
oHeaderRange.Font.Name = FONT_NAME_STANDARD
oHeaderRange.Font.Size = FONT_SIZE_STANDARD_PLUS_ONE
oHeaderRange.Bold = 1
oHeaderRange.Collapse(wdCollapseEnd)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform