Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: includepicture and path to picture

Geek News

includepicture and path to picture
Tom Stian 12/4/2008 12:07:01 PM
Hi all!

Hope you can help me with this question. I've been browsing the web for an
answer to my problem, but all the solutions I find are based on that the path
to a picture is static. Mine, however is not.

The background:
In a CRM/ERP program, you can link a picture to a product. This is stored in
a table (SQL) as the path to the picture (example:
\\server\Picture\Product\Table\Pic1.jpg), and not the picture itself. This
means that I cannot create an INCLUDEPICTURE using a static path to the
pictures, as the path is part of the field I have to retrieve from the table.

I've come this far, but I can't seem to get to the finish line:
{ INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }

Where { Report.Get("g_Prod", "Picture") } retrieves the path to the picture.
I don't think this is an integrated code in Word, but an addon created by the
CRM/ERP company.

This creates the red cross picture, and when i Alt+F9 it, it gives me the
following:
{ INCLUDEPICTURE "\\server\Picture\Product\Table\Pic1.jpg" \d \* MERGEFORMAT }

I then have to edit the field, put two additional \\ in front of \\server
and press OK, and the picture works.

I've also tried:
{ INCLUDEPICTURE "\\{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }

This gives me the following value:
{ INCLUDEPICTURE "\\\\server\Picture\Product\Table\Pic1.jpg" \d \*
MERGEFORMAT }

But no picture. Still have to edit the field, but can now press only OK to
make it leap into action.

My question is therefore.. Is there a code I can use to replace singel \
with \\ in the mergefield, or is there any way I can change the path to the
picture without doing it manually? Maybe use a different mergefield to change
normal path to \\\\server\\picture\\and_so_on

Example:
{ INCLUDEPICTURE "{=REPLACE({ Report.Get("g_Prod", "Picture") }, "\", "\\"}"
\d \* MERGEFORMAT }

All help will be appreciated!

Regards,

Escariot
Re: includepicture and path to picture
"macropod" <macropod[ at ]invalid.invalid> 12/4/2008 12:45:22 PM
Hi Tom,

Can you change the path separators from \ to / in the source file? That would probably fix the problem. An alternative would be to
replace each path separator with \\ or / via a macro after merging.

Also, you can get rid of the '\* MERGEFORMAT' switch - AFAIK it does nothing useful for INCLUDEPICTURE fields.

--
Cheers
macropod
[MVP - Microsoft Word]


"Tom Stian" <Escariot[ at ]discussions.microsoft.com> wrote in message news:5F97A041-C47A-4192-BCD2-648BBBDAD0CA[ at ]microsoft.com...
[Quoted Text]
> Hi all!
>
> Hope you can help me with this question. I've been browsing the web for an
> answer to my problem, but all the solutions I find are based on that the path
> to a picture is static. Mine, however is not.
>
> The background:
> In a CRM/ERP program, you can link a picture to a product. This is stored in
> a table (SQL) as the path to the picture (example:
> \\server\Picture\Product\Table\Pic1.jpg), and not the picture itself. This
> means that I cannot create an INCLUDEPICTURE using a static path to the
> pictures, as the path is part of the field I have to retrieve from the table.
>
> I've come this far, but I can't seem to get to the finish line:
> { INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
>
> Where { Report.Get("g_Prod", "Picture") } retrieves the path to the picture.
> I don't think this is an integrated code in Word, but an addon created by the
> CRM/ERP company.
>
> This creates the red cross picture, and when i Alt+F9 it, it gives me the
> following:
> { INCLUDEPICTURE "\\server\Picture\Product\Table\Pic1.jpg" \d \* MERGEFORMAT }
>
> I then have to edit the field, put two additional \\ in front of \\server
> and press OK, and the picture works.
>
> I've also tried:
> { INCLUDEPICTURE "\\{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
>
> This gives me the following value:
> { INCLUDEPICTURE "\\\\server\Picture\Product\Table\Pic1.jpg" \d \*
> MERGEFORMAT }
>
> But no picture. Still have to edit the field, but can now press only OK to
> make it leap into action.
>
> My question is therefore.. Is there a code I can use to replace singel \
> with \\ in the mergefield, or is there any way I can change the path to the
> picture without doing it manually? Maybe use a different mergefield to change
> normal path to \\\\server\\picture\\and_so_on
>
> Example:
> { INCLUDEPICTURE "{=REPLACE({ Report.Get("g_Prod", "Picture") }, "\", "\\"}"
> \d \* MERGEFORMAT }
>
> All help will be appreciated!
>
> Regards,
>
> Escariot

Re: includepicture and path to picture
Escariot 12/4/2008 1:35:02 PM
Hi, and thank you for the swift reply.

I am not able to change anything in the SQL-table. If I do, then the
OLE/Active-X object in the report generator (Visual FoxPro 9) will not print
the picture, and the picture is not viewable from product information.

Sadly, I'm not familiar with VB macros, so I have no clue as to how to write
such a scipt :o)

Are there no mergefield or other code that can convert \\server\and_so_on to
\\\\server\\and_so_on (or /server/and_so_on for that matter)?

Cheers
Tom

"macropod" wrote:

[Quoted Text]
> Hi Tom,
>
> Can you change the path separators from \ to / in the source file? That would probably fix the problem. An alternative would be to
> replace each path separator with \\ or / via a macro after merging.
>
> Also, you can get rid of the '\* MERGEFORMAT' switch - AFAIK it does nothing useful for INCLUDEPICTURE fields.
>
> --
> Cheers
> macropod
> [MVP - Microsoft Word]
>
>
> "Tom Stian" <Escariot[ at ]discussions.microsoft.com> wrote in message news:5F97A041-C47A-4192-BCD2-648BBBDAD0CA[ at ]microsoft.com...
> > Hi all!
> >
> > Hope you can help me with this question. I've been browsing the web for an
> > answer to my problem, but all the solutions I find are based on that the path
> > to a picture is static. Mine, however is not.
> >
> > The background:
> > In a CRM/ERP program, you can link a picture to a product. This is stored in
> > a table (SQL) as the path to the picture (example:
> > \\server\Picture\Product\Table\Pic1.jpg), and not the picture itself. This
> > means that I cannot create an INCLUDEPICTURE using a static path to the
> > pictures, as the path is part of the field I have to retrieve from the table.
> >
> > I've come this far, but I can't seem to get to the finish line:
> > { INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
> >
> > Where { Report.Get("g_Prod", "Picture") } retrieves the path to the picture.
> > I don't think this is an integrated code in Word, but an addon created by the
> > CRM/ERP company.
> >
> > This creates the red cross picture, and when i Alt+F9 it, it gives me the
> > following:
> > { INCLUDEPICTURE "\\server\Picture\Product\Table\Pic1.jpg" \d \* MERGEFORMAT }
> >
> > I then have to edit the field, put two additional \\ in front of \\server
> > and press OK, and the picture works.
> >
> > I've also tried:
> > { INCLUDEPICTURE "\\{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
> >
> > This gives me the following value:
> > { INCLUDEPICTURE "\\\\server\Picture\Product\Table\Pic1.jpg" \d \*
> > MERGEFORMAT }
> >
> > But no picture. Still have to edit the field, but can now press only OK to
> > make it leap into action.
> >
> > My question is therefore.. Is there a code I can use to replace singel \
> > with \\ in the mergefield, or is there any way I can change the path to the
> > picture without doing it manually? Maybe use a different mergefield to change
> > normal path to \\\\server\\picture\\and_so_on
> >
> > Example:
> > { INCLUDEPICTURE "{=REPLACE({ Report.Get("g_Prod", "Picture") }, "\", "\\"}"
> > \d \* MERGEFORMAT }
> >
> > All help will be appreciated!
> >
> > Regards,
> >
> > Escariot
>
>
Re: includepicture and path to picture
Tom Stian 12/4/2008 1:41:01 PM
Hi macropod, and thanks for the swift reply!

It is not possible to change the field in the SQL-table, as this will
corrupt the picture when using it as an OLE/Active-X object in the integrated
report generator (MS Visual FoxPro 9), and when viewing the picture from the
product module in the program itself.

Sadly, I'm not familiar with creating macros, so it does not seem like an
option to me :o)

Is there no way, using a different mergefield or switch or code to convert
\\server\and_so_on\ to \\\\server\\and_so_on\\ (or /server/and_so_on/ for
that matter)?

Cheers

Tom

"macropod" wrote:

[Quoted Text]
> Hi Tom,
>
> Can you change the path separators from \ to / in the source file? That would probably fix the problem. An alternative would be to
> replace each path separator with \\ or / via a macro after merging.
>
> Also, you can get rid of the '\* MERGEFORMAT' switch - AFAIK it does nothing useful for INCLUDEPICTURE fields.
>
> --
> Cheers
> macropod
> [MVP - Microsoft Word]
>
>
> "Tom Stian" <Escariot[ at ]discussions.microsoft.com> wrote in message news:5F97A041-C47A-4192-BCD2-648BBBDAD0CA[ at ]microsoft.com...
> > Hi all!
> >
> > Hope you can help me with this question. I've been browsing the web for an
> > answer to my problem, but all the solutions I find are based on that the path
> > to a picture is static. Mine, however is not.
> >
> > The background:
> > In a CRM/ERP program, you can link a picture to a product. This is stored in
> > a table (SQL) as the path to the picture (example:
> > \\server\Picture\Product\Table\Pic1.jpg), and not the picture itself. This
> > means that I cannot create an INCLUDEPICTURE using a static path to the
> > pictures, as the path is part of the field I have to retrieve from the table.
> >
> > I've come this far, but I can't seem to get to the finish line:
> > { INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
> >
> > Where { Report.Get("g_Prod", "Picture") } retrieves the path to the picture.
> > I don't think this is an integrated code in Word, but an addon created by the
> > CRM/ERP company.
> >
> > This creates the red cross picture, and when i Alt+F9 it, it gives me the
> > following:
> > { INCLUDEPICTURE "\\server\Picture\Product\Table\Pic1.jpg" \d \* MERGEFORMAT }
> >
> > I then have to edit the field, put two additional \\ in front of \\server
> > and press OK, and the picture works.
> >
> > I've also tried:
> > { INCLUDEPICTURE "\\{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
> >
> > This gives me the following value:
> > { INCLUDEPICTURE "\\\\server\Picture\Product\Table\Pic1.jpg" \d \*
> > MERGEFORMAT }
> >
> > But no picture. Still have to edit the field, but can now press only OK to
> > make it leap into action.
> >
> > My question is therefore.. Is there a code I can use to replace singel \
> > with \\ in the mergefield, or is there any way I can change the path to the
> > picture without doing it manually? Maybe use a different mergefield to change
> > normal path to \\\\server\\picture\\and_so_on
> >
> > Example:
> > { INCLUDEPICTURE "{=REPLACE({ Report.Get("g_Prod", "Picture") }, "\", "\\"}"
> > \d \* MERGEFORMAT }
> >
> > All help will be appreciated!
> >
> > Regards,
> >
> > Escariot
>
>
Re: includepicture and path to picture
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 12/4/2008 4:19:18 PM
If it is possible to use a REPLACE function in FoxPro's dialect of SQL then
you may be able to do this by setting up the data source using Word VBA's
opendatasource call (i.e. some VBA still required). However, I don't have a
copy of FoxPro up and running here so cannot test/explore.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Tom Stian" <TomStian[ at ]discussions.microsoft.com> wrote in message
news:EABD73C7-D80F-4B42-8D1E-81901D3BE258[ at ]microsoft.com...
[Quoted Text]
> Hi macropod, and thanks for the swift reply!
>
> It is not possible to change the field in the SQL-table, as this will
> corrupt the picture when using it as an OLE/Active-X object in the
> integrated
> report generator (MS Visual FoxPro 9), and when viewing the picture from
> the
> product module in the program itself.
>
> Sadly, I'm not familiar with creating macros, so it does not seem like an
> option to me :o)
>
> Is there no way, using a different mergefield or switch or code to convert
> \\server\and_so_on\ to \\\\server\\and_so_on\\ (or /server/and_so_on/ for
> that matter)?
>
> Cheers
>
> Tom
>
> "macropod" wrote:
>
>> Hi Tom,
>>
>> Can you change the path separators from \ to / in the source file? That
>> would probably fix the problem. An alternative would be to
>> replace each path separator with \\ or / via a macro after merging.
>>
>> Also, you can get rid of the '\* MERGEFORMAT' switch - AFAIK it does
>> nothing useful for INCLUDEPICTURE fields.
>>
>> --
>> Cheers
>> macropod
>> [MVP - Microsoft Word]
>>
>>
>> "Tom Stian" <Escariot[ at ]discussions.microsoft.com> wrote in message
>> news:5F97A041-C47A-4192-BCD2-648BBBDAD0CA[ at ]microsoft.com...
>> > Hi all!
>> >
>> > Hope you can help me with this question. I've been browsing the web for
>> > an
>> > answer to my problem, but all the solutions I find are based on that
>> > the path
>> > to a picture is static. Mine, however is not.
>> >
>> > The background:
>> > In a CRM/ERP program, you can link a picture to a product. This is
>> > stored in
>> > a table (SQL) as the path to the picture (example:
>> > \\server\Picture\Product\Table\Pic1.jpg), and not the picture itself.
>> > This
>> > means that I cannot create an INCLUDEPICTURE using a static path to the
>> > pictures, as the path is part of the field I have to retrieve from the
>> > table.
>> >
>> > I've come this far, but I can't seem to get to the finish line:
>> > { INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }" \d \*
>> > MERGEFORMAT }
>> >
>> > Where { Report.Get("g_Prod", "Picture") } retrieves the path to the
>> > picture.
>> > I don't think this is an integrated code in Word, but an addon created
>> > by the
>> > CRM/ERP company.
>> >
>> > This creates the red cross picture, and when i Alt+F9 it, it gives me
>> > the
>> > following:
>> > { INCLUDEPICTURE "\\server\Picture\Product\Table\Pic1.jpg" \d \*
>> > MERGEFORMAT }
>> >
>> > I then have to edit the field, put two additional \\ in front of
>> > \\server
>> > and press OK, and the picture works.
>> >
>> > I've also tried:
>> > { INCLUDEPICTURE "\\{ Report.Get("g_Prod", "Picture") }" \d \*
>> > MERGEFORMAT }
>> >
>> > This gives me the following value:
>> > { INCLUDEPICTURE "\\\\server\Picture\Product\Table\Pic1.jpg" \d \*
>> > MERGEFORMAT }
>> >
>> > But no picture. Still have to edit the field, but can now press only OK
>> > to
>> > make it leap into action.
>> >
>> > My question is therefore.. Is there a code I can use to replace singel
>> > \
>> > with \\ in the mergefield, or is there any way I can change the path
>> > to the
>> > picture without doing it manually? Maybe use a different mergefield to
>> > change
>> > normal path to \\\\server\\picture\\and_so_on
>> >
>> > Example:
>> > { INCLUDEPICTURE "{=REPLACE({ Report.Get("g_Prod", "Picture") }, "\",
>> > "\\"}"
>> > \d \* MERGEFORMAT }
>> >
>> > All help will be appreciated!
>> >
>> > Regards,
>> >
>> > Escariot
>>
>>

Re: includepicture and path to picture
"macropod" <macropod[ at ]invalid.invalid> 12/5/2008 12:18:05 AM
Hi Tom,

On reflection, you can also delete the '\d' switch, reducing your INCLUDEPICTURE mergefield to:
{INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }"}

Having deleted the '\d' switch, here are two ways to change the field code after the mailmerge:
.. WITHOUT a macro -
. Press Alt-F9
. Use Find/Replace, with '\' as the Find string and '/' as the Replace string
This will only work for you if the document has no other '\' characters.
.. WITHOUT a macro -
. Add the following code to, say, your Normal.dot template.

Sub FixMergePaths()
Dim oFld As Field
With ActiveDocument
For Each oFld In .Fields
If oFld.Type = wdFieldIncludePicture Then _
oFld.Code.Text = Replace(oFld.Code.Text, "/", "\")
Next
End With
End Sub

--
Cheers
macropod
[MVP - Microsoft Word]


"Tom Stian" <TomStian[ at ]discussions.microsoft.com> wrote in message news:EABD73C7-D80F-4B42-8D1E-81901D3BE258[ at ]microsoft.com...
[Quoted Text]
> Hi macropod, and thanks for the swift reply!
>
> It is not possible to change the field in the SQL-table, as this will
> corrupt the picture when using it as an OLE/Active-X object in the integrated
> report generator (MS Visual FoxPro 9), and when viewing the picture from the
> product module in the program itself.
>
> Sadly, I'm not familiar with creating macros, so it does not seem like an
> option to me :o)
>
> Is there no way, using a different mergefield or switch or code to convert
> \\server\and_so_on\ to \\\\server\\and_so_on\\ (or /server/and_so_on/ for
> that matter)?
>
> Cheers
>
> Tom
>
> "macropod" wrote:
>
>> Hi Tom,
>>
>> Can you change the path separators from \ to / in the source file? That would probably fix the problem. An alternative would be
>> to
>> replace each path separator with \\ or / via a macro after merging.
>>
>> Also, you can get rid of the '\* MERGEFORMAT' switch - AFAIK it does nothing useful for INCLUDEPICTURE fields.
>>
>> --
>> Cheers
>> macropod
>> [MVP - Microsoft Word]
>>
>>
>> "Tom Stian" <Escariot[ at ]discussions.microsoft.com> wrote in message news:5F97A041-C47A-4192-BCD2-648BBBDAD0CA[ at ]microsoft.com...
>> > Hi all!
>> >
>> > Hope you can help me with this question. I've been browsing the web for an
>> > answer to my problem, but all the solutions I find are based on that the path
>> > to a picture is static. Mine, however is not.
>> >
>> > The background:
>> > In a CRM/ERP program, you can link a picture to a product. This is stored in
>> > a table (SQL) as the path to the picture (example:
>> > \\server\Picture\Product\Table\Pic1.jpg), and not the picture itself. This
>> > means that I cannot create an INCLUDEPICTURE using a static path to the
>> > pictures, as the path is part of the field I have to retrieve from the table.
>> >
>> > I've come this far, but I can't seem to get to the finish line:
>> > { INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
>> >
>> > Where { Report.Get("g_Prod", "Picture") } retrieves the path to the picture.
>> > I don't think this is an integrated code in Word, but an addon created by the
>> > CRM/ERP company.
>> >
>> > This creates the red cross picture, and when i Alt+F9 it, it gives me the
>> > following:
>> > { INCLUDEPICTURE "\\server\Picture\Product\Table\Pic1.jpg" \d \* MERGEFORMAT }
>> >
>> > I then have to edit the field, put two additional \\ in front of \\server
>> > and press OK, and the picture works.
>> >
>> > I've also tried:
>> > { INCLUDEPICTURE "\\{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
>> >
>> > This gives me the following value:
>> > { INCLUDEPICTURE "\\\\server\Picture\Product\Table\Pic1.jpg" \d \*
>> > MERGEFORMAT }
>> >
>> > But no picture. Still have to edit the field, but can now press only OK to
>> > make it leap into action.
>> >
>> > My question is therefore.. Is there a code I can use to replace singel \
>> > with \\ in the mergefield, or is there any way I can change the path to the
>> > picture without doing it manually? Maybe use a different mergefield to change
>> > normal path to \\\\server\\picture\\and_so_on
>> >
>> > Example:
>> > { INCLUDEPICTURE "{=REPLACE({ Report.Get("g_Prod", "Picture") }, "\", "\\"}"
>> > \d \* MERGEFORMAT }
>> >
>> > All help will be appreciated!
>> >
>> > Regards,
>> >
>> > Escariot
>>
>>

Re: includepicture and path to picture
"macropod" <macropod[ at ]invalid.invalid> 12/5/2008 3:36:35 AM
Hi Tom,

Actually, a better rendition of the macro for your purposes might be:

Sub FixMergePaths()
Dim oFld As Field
With ActiveDocument
For Each oFld In .Fields
With oFld
If .Type = wdFieldIncludePicture Then
.Code.Text = Replace( .Code.Text, "/", "\")
.Update
.Unlink
End If
End With
Next
End With
End Sub

The modified code updates the field then unlinks the picture from the source file.

--
Cheers
macropod
[MVP - Microsoft Word]


"macropod" <macropod[ at ]invalid.invalid> wrote in message news:%23jaC78mVJHA.4148[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> Hi Tom,
>
> On reflection, you can also delete the '\d' switch, reducing your INCLUDEPICTURE mergefield to:
> {INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }"}
>
> Having deleted the '\d' switch, here are two ways to change the field code after the mailmerge:
> . WITHOUT a macro -
> . Press Alt-F9
> . Use Find/Replace, with '\' as the Find string and '/' as the Replace string
> This will only work for you if the document has no other '\' characters.
> . WITHOUT a macro -
> . Add the following code to, say, your Normal.dot template.
>
> Sub FixMergePaths()
> Dim oFld As Field
> With ActiveDocument
> For Each oFld In .Fields
> If oFld.Type = wdFieldIncludePicture Then _
> oFld.Code.Text = Replace(oFld.Code.Text, "/", "\")
> Next
> End With
> End Sub
>
> --
> Cheers
> macropod
> [MVP - Microsoft Word]
>
>
> "Tom Stian" <TomStian[ at ]discussions.microsoft.com> wrote in message news:EABD73C7-D80F-4B42-8D1E-81901D3BE258[ at ]microsoft.com...
>> Hi macropod, and thanks for the swift reply!
>>
>> It is not possible to change the field in the SQL-table, as this will
>> corrupt the picture when using it as an OLE/Active-X object in the integrated
>> report generator (MS Visual FoxPro 9), and when viewing the picture from the
>> product module in the program itself.
>>
>> Sadly, I'm not familiar with creating macros, so it does not seem like an
>> option to me :o)
>>
>> Is there no way, using a different mergefield or switch or code to convert
>> \\server\and_so_on\ to \\\\server\\and_so_on\\ (or /server/and_so_on/ for
>> that matter)?
>>
>> Cheers
>>
>> Tom
>>
>> "macropod" wrote:
>>
>>> Hi Tom,
>>>
>>> Can you change the path separators from \ to / in the source file? That would probably fix the problem. An alternative would be
>>> to
>>> replace each path separator with \\ or / via a macro after merging.
>>>
>>> Also, you can get rid of the '\* MERGEFORMAT' switch - AFAIK it does nothing useful for INCLUDEPICTURE fields.
>>>
>>> --
>>> Cheers
>>> macropod
>>> [MVP - Microsoft Word]
>>>
>>>
>>> "Tom Stian" <Escariot[ at ]discussions.microsoft.com> wrote in message news:5F97A041-C47A-4192-BCD2-648BBBDAD0CA[ at ]microsoft.com...
>>> > Hi all!
>>> >
>>> > Hope you can help me with this question. I've been browsing the web for an
>>> > answer to my problem, but all the solutions I find are based on that the path
>>> > to a picture is static. Mine, however is not.
>>> >
>>> > The background:
>>> > In a CRM/ERP program, you can link a picture to a product. This is stored in
>>> > a table (SQL) as the path to the picture (example:
>>> > \\server\Picture\Product\Table\Pic1.jpg), and not the picture itself. This
>>> > means that I cannot create an INCLUDEPICTURE using a static path to the
>>> > pictures, as the path is part of the field I have to retrieve from the table.
>>> >
>>> > I've come this far, but I can't seem to get to the finish line:
>>> > { INCLUDEPICTURE "{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
>>> >
>>> > Where { Report.Get("g_Prod", "Picture") } retrieves the path to the picture.
>>> > I don't think this is an integrated code in Word, but an addon created by the
>>> > CRM/ERP company.
>>> >
>>> > This creates the red cross picture, and when i Alt+F9 it, it gives me the
>>> > following:
>>> > { INCLUDEPICTURE "\\server\Picture\Product\Table\Pic1.jpg" \d \* MERGEFORMAT }
>>> >
>>> > I then have to edit the field, put two additional \\ in front of \\server
>>> > and press OK, and the picture works.
>>> >
>>> > I've also tried:
>>> > { INCLUDEPICTURE "\\{ Report.Get("g_Prod", "Picture") }" \d \* MERGEFORMAT }
>>> >
>>> > This gives me the following value:
>>> > { INCLUDEPICTURE "\\\\server\Picture\Product\Table\Pic1.jpg" \d \*
>>> > MERGEFORMAT }
>>> >
>>> > But no picture. Still have to edit the field, but can now press only OK to
>>> > make it leap into action.
>>> >
>>> > My question is therefore.. Is there a code I can use to replace singel \
>>> > with \\ in the mergefield, or is there any way I can change the path to the
>>> > picture without doing it manually? Maybe use a different mergefield to change
>>> > normal path to \\\\server\\picture\\and_so_on
>>> >
>>> > Example:
>>> > { INCLUDEPICTURE "{=REPLACE({ Report.Get("g_Prod", "Picture") }, "\", "\\"}"
>>> > \d \* MERGEFORMAT }
>>> >
>>> > All help will be appreciated!
>>> >
>>> > Regards,
>>> >
>>> > Escariot
>>>
>>>
>

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