detect color image

H

hlngus

Is there a way to differentiate between a color picture vs a b/w pic?

I'm able to loop through shapes in a doc and count the number of
pictures using the code below,
but want to know if there's a way to detect color in a shape.

If ActiveDocument.Shapes.Count <> 0 Then
For i = 1 To ActiveDocument.Shapes.Count
If left(ActiveDocument.Shapes(i).name, 4) = "PICT" Then
picture = True
PhotoCnt = PhotoCnt + 1
End If
Next
End If

Thanks.
 
H

hlngus

Wanted to add that using activedocument.Shapes(i).fill.forecolor.RGB
is supposed to provide a value that indicates whether there is color
or not, but I tried checking a color shape and a b/w and got 16777215
in the case of what I thought was a color image and one that was b/w.
 

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