Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel automation picture copy&paste or insert problem
Message
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01420402
Message ID:
01420419
Views:
40
>In the second case you've to use full path of the file because Excel has no knowledge about VFP current directory. It has its own current directory.
>
>PicLocation = FULLPATH("windows7.jpg")
>...
>oExcel.Range("A3").PictureS.Insert(PicLocation)
>
>
>>
>>i wanted to copy&paste or insert picture ( eg. logo.jpg ) to the my exrel report i've tried below codes one of doesnt working ( not affect anything ) other ( copy&paste method ) codes workings but seem on the sheet logo.jpg (name of the file and when i click picture viewer showing it )
>>
>>:( where is the wrong ?
>>
>>
>>
>>	With oExcel
>>		.Rows("1:1").RowHeight = 35.00
>>		.Rows("2:2").RowHeight = 35.00
>>		.Range("A1").Select
>>		Local PicLocation As String
>>		PicLocation = "windows7.jpg"
>>		Create Cursor tblImg(img G)
>>		Append Blank
>>		Append General img From &PicLocation
>>		Use Dbf("TBLIMG") Again In 0
>>		Locate
>>		Keyboard "{CTRL+C}{CTRL+W}" && Copy the jpg
>>		Modify General tblImg.img
>>		.ActiveSheet.paste()
>>	Endwith
>>
>>
>>below codes doesnt affect
>>
>>	*!*		Local PicLocation As String
>>	*!*		PicLocation = "windows7.jpg"
>>	*!*		If PicLocation <> "" Then
>>	*!*			*oExcel.Selection.PictureS.Insert(PicLocation).Select
>>	*!*			oExcel.Range("A3").PictureS.Insert(PicLocation)
>>	*!*		Else
>>	*!*		Endif
>>
>>
>>Environment : Win7 RTM + Office2007 + VFP SP2

Hi Sergey,
i've tried as your suggested but nothing changed :(
you can see the result picture at www.soykansoft.com/news_images/soykan.jpg
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform