Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Converting Code from VBA to OI
I am trying to convert the following vba code to OI
ActiveSheet.Shapes.AddPicture("H:\Revsoft\OI92\bmps\test.jpg", False, True, -1, -1, -1, -1).Select
Any suggestions?
ActiveSheet.Shapes.AddPicture("H:\Revsoft\OI92\bmps\test.jpg", False, True, -1, -1, -1, -1).Select
Any suggestions?
Comments
objShapes = OleGetProperty(objActiveSheet, "Shapes") If OleStatus() then Error = "Could not get the Shapes collection." end else objPicture = OleCallMethod(objShapes, "AddPicture", "H:\Revsoft\OI92\bmps\test.jpg", 0, 1, -1, -1, -1, -1) If OleStatus() then Error = "Could not add picture." end else OleCallMethod(objPicture, "Select") If OleStatus() then Error = "Could not select picture." end end end
Hope that gets you started on the wrong foot.I solved it in the mean time, but this helped for other stuff i am doing too.
I still need to comprehend when to use the method and when to use property commands.
My next problem is creation of borders.
I got the range and the border objects working, but i am fighting to get to the different edges so i can put the other properties.
If you have any suggestions let me know.
And once more thanks for the hint.