FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Excel Command - still need help
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Excel Command - still need help
Posted: Thu Apr 05, 2007 06: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:

Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 286.5
Selection.ShapeRange.Width = 657#
Selection.ShapeRange.Rotation = 0#


I tried:
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
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Excel Command - still need help
Posted: Thu Apr 05, 2007 07:44 PM
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

Continue the discussion