Hi Cindy,
Thanks for your reply.
The IncludePicture Field is already in the Word template
file when my app starts to generate letters. In my code,
it finds the IncludePicture field in the newly generated
document and uses the following code:
If WordFLD.Type = wdFieldIncludePicture then
If Not IsNull(rsMain.Fields("DefaultImage")) Then
strPictureName = rsMain.Fields("DefaultImage")
strPicturePath = ImagesPath & "\" & strPictureName
'Slashes must be replaced by double
slashes
strPicturePath = Replace(strPicturePath, "\", "\\")
'insert new picture
WordFLD.Code.Text = "INCLUDEPICTURE " & Chr(34) &
strPicturePath & Chr(34) & "" & " \d"
WordFLD.Update
As you can see, the path is packed in a variable that will
be filled by the recordset. It then uses the '.Code.Text'
method to change the pathname for the IncludePicture
Field. This works fine, as long as it is NOT a full UNC
path. So: 'G:\blahblah\etc' works fine,
but '\\ServerX\blahblah\etc' is not recognized. It has
something to do with the double backslashes of the server
name. The field sees it as a URL or something. I searched
all over the net, but I cannot find a solution (swearing
now).
You think there is a way out of here?
Thanks in advance,
John
>-----Original Message-----
>Hi John,
[quoted text clipped - 23 lines]
>
>.
Cindy M -WordMVP- - 29 Dec 2003 12:55 GMT
Hi John,
> but '\\ServerX\blahblah\etc' is not recognized. It has
> something to do with the double backslashes of the server
> name.
There should be FOUR backslashes, not just two? (Can't tell
if you've really allowed for this...)
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
Hi Cindy,
I did...but something funny has happened: last weekend we
installed 2003 server and suddenly it seems to work. Maybe
NT has something to do with this????????
I'm going to find out.
Oh, by the way: i took the liberty of checking your site.
Keep up the good work!
Thanks
John.
>-----Original Message-----
>Hi John,
[quoted text clipped - 17 lines]
>
>.