Setting picture to "Original Size" via macro
Posted: Mon Nov 17, 2008 7:01 pm
This is probably very simple, but I just can't figure out to do it:
I insert a picture (Insert -> Picture -> From File...). However, OO changes its displayed size so that it doesn't show at its original size.
I need to change the picture's size to its original size (Format -> Picture... -> Type -> Original Size).
I have to do this with hundreds of pictures, so it would be hugely helpful to create a macro to do this and assign it to a keyboard shortcut.
I know how to create macros and assign them to the keyboard, but I don't know what command to use to assign the correct size. I've got this far...
How do I find the correct values for Height and Width, remembering that the pictures come in different sizes?
Thanks
I insert a picture (Insert -> Picture -> From File...). However, OO changes its displayed size so that it doesn't show at its original size.
I need to change the picture's size to its original size (Format -> Picture... -> Type -> Original Size).
I have to do this with hundreds of pictures, so it would be hugely helpful to create a macro to do this and assign it to a keyboard shortcut.
I know how to create macros and assign them to the keyboard, but I don't know what command to use to assign the correct size. I've got this far...
Code: Select all
sub SetToOriginalSize
dim oPic as Object
oPic = ThisComponent.CurrentSelection
oPic.Height = ???
oPic.Width = ???
end sub
Thanks