Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Sub Macro1() ' Range("F3").Select Range("F3").AddComment Range("F3").Comment.Visible = False Range("F3").Comment.Text Text:="(Width)(Length)" Selection.ShapeRange.ScaleWidth 1.58, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 0.22, msoFalse, msoScaleFromTopLeft Range("F3").Select End Sub
Here is an attempt at translating the code to WinBatch:
;!! UNDEBUGGED !! XLS = "c:\temp\Data\sample2.xls" ; !!! CHANGE TO FIT YOUR NEEDS !!! objXL=ObjectOpen("Excel.Application") objXL.Visible=@TRUE ;Change to @FALSE to hide objXL.UserControl=@TRUE objWBK=objXL.Workbooks objWBK.Open(XLS) objRange=objXL.Range("F3") objRange.AddComment objComment = objRange.Comment objComment.Visible = @TRUE ;Change to @FALSE to hide objComment.Text(:: Text="(Width)(Length)") msoFalse = 0 msoScaleFromTopLeft = 0 objShape = objComment.Shape objShape.ScaleWidth(1.58, msoFalse, msoScaleFromTopLeft) objShape.ScaleHeight(0.22, msoFalse, msoScaleFromTopLeft) Pause("Debugging","Caheck that the changes were made") objXL.Quit ObjectClose(objShape) ObjectClose(objComment) ObjectClose(objRange) ObjectClose(objWBK) ObjectClose(objXL)
Article ID: W16101
File Created: 2004:03:30:15:42:52
Last Updated: 2004:03:30:15:42:52