Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nicholas Nicholas is offline
external usenet poster
 
Posts: 12
Default if then else for includepicture

I am trying to use the includepicture syntex..
{INCLUDEPICTURE "{IF TRUE "E:\\Temp\\{Mergefield FirstName}{Mergefield
LastName}.jpg"}" \d }

However, what I am looking for, is if I don't have a picture, then I want it
to use a default picture as in e:\temp\default.jpg. How can I do this.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default if then else for includepicture

I don't believe there's a known, reliable "fields only" solution for
this, at least on a "standard " installation. Your best bets a
a. if possible, modify the data source, or pre-process the data source
so that each row contains the path of the image you need to insert,
using e:\temp\default.jpg where necessary
b. use VBA and Word Mailmerge events to check whether the file exists,
then insert the default if it does not.

If you want to pursue either of those, please verify that your
environment does not prevent a solution that uses e.g. database or VBA
programming, then let us know which version of Word you are using and
what the data source is.

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/12/2009 22:26, Nicholas wrote:
I am trying to use the includepicture syntex..
{INCLUDEPICTURE "{IF TRUE "E:\\Temp\\{Mergefield FirstName}{Mergefield
LastName}.jpg"}" \d }

However, what I am looking for, is if I don't have a picture, then I want it
to use a default picture as in e:\temp\default.jpg. How can I do this.

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Miles Miles is offline
external usenet poster
 
Posts: 10
Default if then else for includepicture

There was some discussion of that in this forum years ago (search this forum
for "includetext conditional," result for 3/15/2006). The solution isn't very
reliable and you will see an error message box every time the file doesn't
exist, but the idea was something like:

{IF {INCLUDETEXT "{IF TRUE "E:\\Temp\\{Mergefield FirstName}{Mergefield
LastName}.jpg"}" } = "File is not available" { INCLUDEPICTURE
"e:\\temp\\default.jpg" \d } {INCLUDEPICTURE "{IF TRUE "E:\\Temp\\{Mergefield
FirstName}{Mergefield LastName}.jpg"}" \d } }

I haven't tested this myself, but there it is if it helps.

There is also a commercial add-in that entirely solves the problem named
OnMerge

--Miles

"Nicholas" wrote:

I am trying to use the includepicture syntex..
{INCLUDEPICTURE "{IF TRUE "E:\\Temp\\{Mergefield FirstName}{Mergefield
LastName}.jpg"}" \d }

However, what I am looking for, is if I don't have a picture, then I want it
to use a default picture as in e:\temp\default.jpg. How can I do this.

Thanks in advance.

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
INCLUDEPICTURE JethroUK© Mailmerge 2 October 24th 07 12:14 AM
INCLUDEPICTURE from URL LAR Mailmerge 4 February 1st 07 03:23 AM
includepicture Saj Mailmerge 1 August 4th 06 12:44 PM
Includepicture John Sutton Mailmerge 2 July 3rd 06 09:50 PM
INCLUDEPICTURE - not working Dixie Mailmerge 2 October 31st 05 07:39 AM


All times are GMT +1. The time now is 01: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"