Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Insert image conditionally

Geek News

Insert image conditionally
"Russell Campbell" <noreply[ at ]bytemeyouspammer.com> 5/23/2007 2:49:46 PM
I was on http://word.mvps.org/FAQS/MailMerge/CreateAMailMerge.htm where
there is some info on conditionally inserting an image into a document.
Unfortunately, I am not having much success with what it says should work.

Specifically, it says use something like this:

{ IF { MERGEFIELD FirstName } <> "" { INCLUDEPICTURE "C:\\Temp\\Logo.tif" \d
\* MERGEFORMAT } "" }

But it will not display the graphic and it seems to sometimes mangle my
entries (for instance, I close the document and bring it up later and it has
changed what I entered).

My statement was:

{ IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE "c:\\msds\\test.bmp" \d \*
MERGEFORMAT } "" }



But Word alters it and later I get:



{ IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE "../../../..msds\\test.bmp"
\* MERGEFORMAT \d } "" }



Not sure why that is and really don't care as long as this will work, but it
does not. Any help would be appreciated.



Russell Campbell


Re: Insert image conditionally
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 5/23/2007 2:59:35 PM
Try - Tools > options > general > web options > files > uncheck update links
on save.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Russell Campbell wrote:
[Quoted Text]
> I was on http://word.mvps.org/FAQS/MailMerge/CreateAMailMerge.htm
> where there is some info on conditionally inserting an image into a
> document. Unfortunately, I am not having much success with what it
> says should work.
> Specifically, it says use something like this:
>
> { IF { MERGEFIELD FirstName } <> "" { INCLUDEPICTURE
> "C:\\Temp\\Logo.tif" \d \* MERGEFORMAT } "" }
>
> But it will not display the graphic and it seems to sometimes mangle
> my entries (for instance, I close the document and bring it up later
> and it has changed what I entered).
>
> My statement was:
>
> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE "c:\\msds\\test.bmp"
> \d \* MERGEFORMAT } "" }
>
>
>
> But Word alters it and later I get:
>
>
>
> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE
> "../../../..msds\\test.bmp" \* MERGEFORMAT \d } "" }
>
>
>
> Not sure why that is and really don't care as long as this will work,
> but it does not. Any help would be appreciated.
>
>
>
> Russell Campbell


Re: Insert image conditionally
"Russell Campbell" <noreply[ at ]bytemeyouspammer.com> 5/23/2007 3:29:21 PM
Thanks. I'll check that out. I'm making progress. It seems that it is
necessary to use F9 to update or this just doesn't work as expected. I have
to do some testing in a real document - only been using a little test doc so
far - then I have to see if I can write a macro to make the necessary
changes in hundreds of existing docs.

"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message
news:uSy97rUnHHA.4316[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
> Try - Tools > options > general > web options > files > uncheck update
> links on save.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> Russell Campbell wrote:
>> I was on http://word.mvps.org/FAQS/MailMerge/CreateAMailMerge.htm
>> where there is some info on conditionally inserting an image into a
>> document. Unfortunately, I am not having much success with what it
>> says should work.
>> Specifically, it says use something like this:
>>
>> { IF { MERGEFIELD FirstName } <> "" { INCLUDEPICTURE
>> "C:\\Temp\\Logo.tif" \d \* MERGEFORMAT } "" }
>>
>> But it will not display the graphic and it seems to sometimes mangle
>> my entries (for instance, I close the document and bring it up later
>> and it has changed what I entered).
>>
>> My statement was:
>>
>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE "c:\\msds\\test.bmp"
>> \d \* MERGEFORMAT } "" }
>>
>>
>>
>> But Word alters it and later I get:
>>
>>
>>
>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE
>> "../../../..msds\\test.bmp" \* MERGEFORMAT \d } "" }
>>
>>
>>
>> Not sure why that is and really don't care as long as this will work,
>> but it does not. Any help would be appreciated.
>>
>>
>>
>> Russell Campbell
>
>


Re: Insert image conditionally
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 5/24/2007 5:49:07 AM
When merging graphics you need to merge to a new document then update the
fields in that document - see http://www.gmayor.com/mail_merge_graphics.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Russell Campbell wrote:
[Quoted Text]
> Thanks. I'll check that out. I'm making progress. It seems that it
> is necessary to use F9 to update or this just doesn't work as
> expected. I have to do some testing in a real document - only been
> using a little test doc so far - then I have to see if I can write a
> macro to make the necessary changes in hundreds of existing docs.
>
> "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message
> news:uSy97rUnHHA.4316[ at ]TK2MSFTNGP06.phx.gbl...
>> Try - Tools > options > general > web options > files > uncheck
>> update links on save.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> Russell Campbell wrote:
>>> I was on http://word.mvps.org/FAQS/MailMerge/CreateAMailMerge.htm
>>> where there is some info on conditionally inserting an image into a
>>> document. Unfortunately, I am not having much success with what it
>>> says should work.
>>> Specifically, it says use something like this:
>>>
>>> { IF { MERGEFIELD FirstName } <> "" { INCLUDEPICTURE
>>> "C:\\Temp\\Logo.tif" \d \* MERGEFORMAT } "" }
>>>
>>> But it will not display the graphic and it seems to sometimes mangle
>>> my entries (for instance, I close the document and bring it up later
>>> and it has changed what I entered).
>>>
>>> My statement was:
>>>
>>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE "c:\\msds\\test.bmp"
>>> \d \* MERGEFORMAT } "" }
>>>
>>>
>>>
>>> But Word alters it and later I get:
>>>
>>>
>>>
>>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE
>>> "../../../..msds\\test.bmp" \* MERGEFORMAT \d } "" }
>>>
>>>
>>>
>>> Not sure why that is and really don't care as long as this will
>>> work, but it does not. Any help would be appreciated.
>>>
>>>
>>>
>>> Russell Campbell


Re: Insert image conditionally
"Russell Campbell" <noreply[ at ]bytemeyouspammer.com> 5/24/2007 1:27:22 PM
Thanks again. I went to your site to look around and found some helpful
information and to Cindy Meister's site. I think some of the issues I'm
having are related to using Excel as a data source. I'm wondering if a text
file would be better. What can you tell me about that?

"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message
news:OkBr%23ccnHHA.4592[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> When merging graphics you need to merge to a new document then update the
> fields in that document - see
> http://www.gmayor.com/mail_merge_graphics.htm
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> Russell Campbell wrote:
>> Thanks. I'll check that out. I'm making progress. It seems that it
>> is necessary to use F9 to update or this just doesn't work as
>> expected. I have to do some testing in a real document - only been
>> using a little test doc so far - then I have to see if I can write a
>> macro to make the necessary changes in hundreds of existing docs.
>>
>> "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message
>> news:uSy97rUnHHA.4316[ at ]TK2MSFTNGP06.phx.gbl...
>>> Try - Tools > options > general > web options > files > uncheck
>>> update links on save.
>>>
>>> --
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>> Graham Mayor - Word MVP
>>>
>>> My web site www.gmayor.com
>>> Word MVP web site http://word.mvps.org
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>
>>>
>>> Russell Campbell wrote:
>>>> I was on http://word.mvps.org/FAQS/MailMerge/CreateAMailMerge.htm
>>>> where there is some info on conditionally inserting an image into a
>>>> document. Unfortunately, I am not having much success with what it
>>>> says should work.
>>>> Specifically, it says use something like this:
>>>>
>>>> { IF { MERGEFIELD FirstName } <> "" { INCLUDEPICTURE
>>>> "C:\\Temp\\Logo.tif" \d \* MERGEFORMAT } "" }
>>>>
>>>> But it will not display the graphic and it seems to sometimes mangle
>>>> my entries (for instance, I close the document and bring it up later
>>>> and it has changed what I entered).
>>>>
>>>> My statement was:
>>>>
>>>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE "c:\\msds\\test.bmp"
>>>> \d \* MERGEFORMAT } "" }
>>>>
>>>>
>>>>
>>>> But Word alters it and later I get:
>>>>
>>>>
>>>>
>>>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE
>>>> "../../../..msds\\test.bmp" \* MERGEFORMAT \d } "" }
>>>>
>>>>
>>>>
>>>> Not sure why that is and really don't care as long as this will
>>>> work, but it does not. Any help would be appreciated.
>>>>
>>>>
>>>>
>>>> Russell Campbell
>
>


Re: Insert image conditionally
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 5/24/2007 2:21:29 PM
The Excel data source should not be an issue provided its use produces the
correct filename and path - however the conditional field may be - see the
workaround at http://www.gmayor.com/formatting_word_fields.htm
(Conditionally Insert a Graphical Image)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Russell Campbell wrote:
[Quoted Text]
> Thanks again. I went to your site to look around and found some
> helpful information and to Cindy Meister's site. I think some of the
> issues I'm having are related to using Excel as a data source. I'm
> wondering if a text file would be better. What can you tell me about
> that?
> "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message
> news:OkBr%23ccnHHA.4592[ at ]TK2MSFTNGP05.phx.gbl...
>> When merging graphics you need to merge to a new document then
>> update the fields in that document - see
>> http://www.gmayor.com/mail_merge_graphics.htm
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>> Russell Campbell wrote:
>>> Thanks. I'll check that out. I'm making progress. It seems that
>>> it is necessary to use F9 to update or this just doesn't work as
>>> expected. I have to do some testing in a real document - only been
>>> using a little test doc so far - then I have to see if I can write a
>>> macro to make the necessary changes in hundreds of existing docs.
>>>
>>> "Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> wrote in message
>>> news:uSy97rUnHHA.4316[ at ]TK2MSFTNGP06.phx.gbl...
>>>> Try - Tools > options > general > web options > files > uncheck
>>>> update links on save.
>>>>
>>>> --
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>> Graham Mayor - Word MVP
>>>>
>>>> My web site www.gmayor.com
>>>> Word MVP web site http://word.mvps.org
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>
>>>>
>>>> Russell Campbell wrote:
>>>>> I was on http://word.mvps.org/FAQS/MailMerge/CreateAMailMerge.htm
>>>>> where there is some info on conditionally inserting an image into
>>>>> a document. Unfortunately, I am not having much success with what
>>>>> it says should work.
>>>>> Specifically, it says use something like this:
>>>>>
>>>>> { IF { MERGEFIELD FirstName } <> "" { INCLUDEPICTURE
>>>>> "C:\\Temp\\Logo.tif" \d \* MERGEFORMAT } "" }
>>>>>
>>>>> But it will not display the graphic and it seems to sometimes
>>>>> mangle my entries (for instance, I close the document and bring
>>>>> it up later and it has changed what I entered).
>>>>>
>>>>> My statement was:
>>>>>
>>>>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE
>>>>> "c:\\msds\\test.bmp" \d \* MERGEFORMAT } "" }
>>>>>
>>>>>
>>>>>
>>>>> But Word alters it and later I get:
>>>>>
>>>>>
>>>>>
>>>>> { IF { MERGEFIELD msdsmfg } = 1 {INCLUDEPICTURE
>>>>> "../../../..msds\\test.bmp" \* MERGEFORMAT \d } "" }
>>>>>
>>>>>
>>>>>
>>>>> Not sure why that is and really don't care as long as this will
>>>>> work, but it does not. Any help would be appreciated.
>>>>>
>>>>>
>>>>>
>>>>> Russell Campbell


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net