Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel automation picture copy&paste or insert problem
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel automation picture copy&paste or insert problem
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01420402
Message ID:
01420402
Views:
132
Hi All,

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
Next
Reply
Map
View

Click here to load this message in the networking platform