Detect and delete "empty" pictures.

Q

qqla

Hi all, Would anyone know how to detect "empty" pictures merged fro
Excel's empty fields and inserted into Word by IncludePicture an
Convert(ed)ToShape?

The only way I could distinguish between "real" pictures and "empty
ones was Convert(ing back)ToInlineShape which generates "4120 Ba
patameter" error for "empty" ones, but unfortunately breaking documen
formating at the same time.
Thank you, Qqla
 
C

Cindy M -WordMVP-

Hi Qqla,
Would anyone know how to detect "empty" pictures merged from
Excel's empty fields and inserted into Word by IncludePicture and
Convert(ed)ToShape?

The only way I could distinguish between "real" pictures and "empty"
ones was Convert(ing back)ToInlineShape which generates "4120 Bad
patameter" error for "empty" ones, but unfortunately breaking document
formating at the same time.
Can you describe how this solution is working? I take it you're using a
macro to do the shape conversion? Why not perform the check BEFORE
converting to a shape?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
Q

qqla

Thank you Cindy for replying to my post. I'm using VBA and the reason
I'm not checking for empty fields in the MergeField(s), i.e.
{IncludePicture {IF {MergeField <FieldName>} <> ""
"<path\\picture.gif>" ""}}, is that IF construct causes to repeat the
same picture after merge operation in word 2000.
Finally I got around this problem by searching for a path with no
picture after merge, having field codes turned on, and replacing it
with "". But it is not a "clean" solution.
Thanks,
Qqla
 

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