Excel Command - still need help

Excel Command - still need help

Postby Jeff Barnes » Thu Apr 05, 2007 6:29 pm

Hi Everybody,

I thought I had this figured out but no such luck. (Re-size an inserted image)

I need to convert the folowing code to fwh:

Code: Select all  Expand view
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 286.5
Selection.ShapeRange.Width = 657#
Selection.ShapeRange.Rotation = 0#


I tried:
Code: Select all  Expand view
oSheet:Pictures:Height:= 286.5
oSheet:Pictures:Width:= 657


But that resized ALL images that I had inserted. I want to be able to re-size them as I insert them leaving previous images alone.

Thanks,
Jeff
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Excel Command - still need help

Postby Enrico Maria Giordano » Thu Apr 05, 2007 7:44 pm

Code: Select all  Expand view
FUNCTION MAIN()

    LOCAL oExcel, oSheet

    oExcel = CreateObject( "Excel.Application" )

    oExcel:WorkBooks:Add()

    oSheet = oExcel:ActiveSheet

    oSheet:Shapes:AddPicture( "C:\XHARBOUR\SFONDO.JPG", .F., .T., 0, 0, 200, 150 )

    oSheet:Shapes[ 1 ]:Height = 50
    oSheet:Shapes[ 1 ]:Width = 50

    oExcel:Visible = .T.

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft and 47 guests