Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picture Manipulation in Word
Message
From
23/04/2002 01:34:02
 
 
To
22/04/2002 10:21:39
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00647436
Message ID:
00647985
Views:
14
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
Previous
Reply
Map
View

Click here to load this message in the networking platform