Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Picture Manipulation in Word
Message
From
22/04/2002 10:21:39
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00647436
Message ID:
00647533
Views:
13
>After pasting the code to VFP and making the necessary syntax changes, I received an error message when trying to do anything with the picture :"The requested member of the collection does not exist".
>oWord=createobject('Word.Application')
>With oWord
> .Visible=.T.
> .Documents.Add
> .ActiveWindow.ActivePane.View.SeekView = 9 && wdSeekCurrentPageHeader
> .Selection.InlineShapes.AddPicture('d:\xyz.bmp')
> With .Selection.InlineShapes(1) && Error at this

Try addressing the InlineShapes collection through the document rather than through the Selection object:

oWord.ActiveDocument.InlineShapes[1]

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform