Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
INCLUDEPICTURE | Mailmerge | |||
INCLUDEPICTURE from URL | Mailmerge | |||
includepicture | Mailmerge | |||
Includepicture | Mailmerge | |||
INCLUDEPICTURE - not working | Mailmerge |