Reply
 
Thread Tools Display Modes
  #1   Report Post  
qqla qqla is offline
Junior Member
 
Posts: 3
Default Detect and delete "empty" pictures.

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

Last edited by qqla : January 4th 06 at 03:27 AM
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Cindy M -WordMVP-
 
Posts: n/a
Default Detect and delete "empty" pictures.

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 :-)

  #3   Report Post  
qqla qqla is offline
Junior Member
 
Posts: 3
Default

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

Quote:
Originally Posted by 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 :-)
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot use the delete key for deleting a block of text NCL Microsoft Word Help 1 March 29th 05 12:47 AM


All times are GMT +1. The time now is 09:42 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"