VBA macro graphic import wrong size / size conversion

asked 2020-01-25 13:01:07 +0200

gzoo gravatar image

Once I want to import graphic by VBA macro, it works well, except the original size. The imported picture has a size of 0,1 x 0,1 cm, when I try read by 'oShape.Width' get 100. Wich means, I can not resize with correct / original aspect ratio. Beside, if I import picture by menu of CALC (insert picture), it works properly if original picture contained resolution metadata (pixel per inches, PPI) most of the time. It is still a question how CALC reaact if picture does not contain resolution property. Regardless of existence of resolution property in picture file, import by VBA script gives a 0,1 x 0,1 cm size. How can I fix this? Or how can I get picture property size at least in pixels?

edit retag flag offensive close merge delete