From: andreas on
Word 2007

Dear Experts:

I would like to increase the brightness of all pictures of my
documents by 10%. How is this done using VBA.

Help is much appreciated. Thank you very much in advance.

Regards,

Andreas
From: Graham Mayor on
Something like the following might work, depending on where your pictures
were located in the document.

With ActiveDocument
For i = 1 To .InlineShapes.Count
If .InlineShapes(i).Type = wdInlineShapePicture Then
.InlineShapes(i).PictureFormat.Brightness = _
.InlineShapes(i).PictureFormat.Brightness + 0.1
End If
Next i
For i = 1 To .Shapes.Count
If .Shapes(i).Type = msoPicture Then
.Shapes(i).PictureFormat.Brightness = _
.Shapes(i).PictureFormat.Brightness + 0.1
End If
Next i
End With

However why do you need to do this? It would be better if you investigated
why the pictures were not bright enough in the first place. Is this a
display issue, a printer problem or just poor photography?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


andreas wrote:
> Word 2007
>
> Dear Experts:
>
> I would like to increase the brightness of all pictures of my
> documents by 10%. How is this done using VBA.
>
> Help is much appreciated. Thank you very much in advance.
>
> Regards,
>
> Andreas


From: andreas on
On 16 Nov., 08:30, "Graham Mayor" <gma...(a)REMOVETHISmvps.org> wrote:
> Something like the following might work, depending on where your pictures
> were located in the document.
>
> With ActiveDocument
>     For i = 1 To .InlineShapes.Count
>         If .InlineShapes(i).Type = wdInlineShapePicture Then
>             .InlineShapes(i).PictureFormat.Brightness = _
>             .InlineShapes(i).PictureFormat.Brightness + 0.1
>         End If
>     Next i
>     For i = 1 To .Shapes.Count
>         If .Shapes(i).Type = msoPicture Then
>             .Shapes(i).PictureFormat.Brightness = _
>             .Shapes(i).PictureFormat.Brightness + 0.1
>         End If
>     Next i
> End With
>
> However why do you need to do this? It would be better if you investigated
> why the pictures were not bright enough in the first place. Is this a
> display issue, a printer problem or just poor photography?
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor -  Word MVP
>
> My web sitewww.gmayor.com
> Word MVP web sitehttp://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
>
> andreas wrote:
> > Word 2007
>
> > Dear Experts:
>
> > I would like to increase the brightness of all pictures of my
> > documents by 10%. How is this done using VBA.
>
> > Help is much appreciated. Thank you very much in advance.
>
> > Regards,
>
> > Andreas- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Dear Graham,

ok, thank you very much for your professional help. One strange thing.
I had to change the 0.1 to 0.05 to get a 10% increase. That is, 0.1
results in a 20% increase in brightness. Strange isn't it?
Anyhow, to answer your question: It is poor photography which makes me
do this.

Thank you again for your terrific help. Regards, Andreas