Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Document Headers - Modifying Font Size
Message
 
À
02/08/2002 09:38:14
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00685178
Message ID:
00685400
Vues:
13
Wel, i am not quite certain, i've learned it the hard way (trial & error), but it seems to me by using a collapse(wdcollapseEnd), the range is reduced to a "size" of 0, and you can't add styles or format or such to such a range.

What also works is this :

oHeaderRange = oHeader.Range()
with oHeaderRange
.InsertAfter("TOP ROW IN HEADER")
.insertafter(CHR(13))
.Font.Name = "Arial"
.Font.Size = 20
.Font.Bold = 1
.ParagraphFormat.Alignment = wdAlignParagraphCenter


.Collapse(wdCollapseEnd)
.InsertAfter("Middle Row in Header")
.InsertAfter(CHR(13))
.Font.Size = 10


.Collapse(wdCollapseEnd)
.InsertAfter(dtoc(date()))
.Font.Size = 8
endwith
endwith

Now we do the insertafter() before changing the fontsize. this stretches the range() to a size more then zero, and it seems to work also.
If someone otherthere has a better explanation, please let us know...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform