Windows metafile image error in VBA office 2010

C

ccogliati

Hi, im trying to make a macro that, after manually setecting the image, turns the brightness to -100%.

It's a quite simple line of code, that works like a charm with BMP images, but doesnt't work with windows metafile images, giving runtime error:

'-2147024809 (80070057)' and something like "you can only have access to this function for an image or OLE object"

(sorry for the inaccurate translation, i have office in spanish)


here is the code:
-------------
Sub Macro2()

Selection.InlineShapes(1).Reset

Selection.InlineShapes(1).Fill.PictureEffects.Insert(msoEffectBrightnessContrast).EffectParameters(1).Value = -1

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top