Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Picture Manipulation in Word
Message
 
À
22/04/2002 10:21:39
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00647436
Message ID:
00647985
Vues:
15
Hi Tamar,

Thanks for your reply. Did sort-of work - I was trying to put a logo and a textbox in a page header programatically. The result I now have is not within the header (which will do - but not as nice as having it within the header):

With oWord
.Visible=.T.
.Documents.Add
* .ActiveWindow.ActivePane.View.SeekView = 9 && wdSeekCurrentPageHeader
With .ActiveDocument
store 36 to .PageSetup.TopMargin, .PageSetup.BottomMargin,;
.PageSetup.LeftMargin, .PageSetup.RightMargin
.InlineShapes.AddPicture('D:\MYAPP\IMAGES\XYZ.BMP')
.InlineShapes[1].Height = 28.8
.InlineShapes[1].Width = 43.9
EndWith
With .Selection.ParagraphFormat.Borders(-3) && wdBorderBottom
.LineStyle = 9 && wdLineStyleThinThickSmallGap
.LineWidth = 24 && wdLineWidth300pt
.Color = rgb(0,0,128)
EndWith

.ActiveDocument.Shapes.AddTextbox(1, 100, 20, 420, 18).Select
With .Selection
.ParagraphFormat.Alignment = 1 && wdAlignParagraphCenter
.ShapeRange.Line.Visible = .F.
.Font.Name = "Arial"
.Font.Size = 12
.Font.Bold = .T.
.Font.Color = rgb(0,0,0)
.Font.Scaling = 100
.TypeText("My App - "+cCityName)
EndWith
EndWith
<\pre>



>Try addressing the InlineShapes collection through the document rather than through the Selection object:
>
>oWord.ActiveDocument.InlineShapes[1]
>
>Tamar
>Try addressing the InlineShapes collection through the document rather than through the Selection object:
>
>oWord.ActiveDocument.InlineShapes[1]
>
>Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform