Hi maperalia,
From what I can tell, the problem is caused by the fact that paths in fields
need to be separated by either double back-slashes (i.e. '\\') or single
forward slashes (i.e. '/'), but your code only generates single back-slashes
(i.e. '\'). Also, if your filename or path has spaces anywhere in it, the
lot must be enclosed in double quotes.
You may be able to correct this by changing:
linkcode.Text = linktype & sPath & linklocation
to:
linkcode.Text = linktype & Chr(34) & Replace(sPath, "\", "\\") & Chr(34) &
linklocation
Cheers
> I have a program (see below)which is run from excel and that does the
> following:
[quoted text clipped - 5 lines]
>
> After the program finish I check the link in the word file by clicking
"Alt
> + F9" to verify that the new links have taken place. Although the new link
> took place I "Select all" under edit menu then I select "Update Link" and
I
> got the following message:
> "Word in unable to create a link to the object you specified, Please
insert
> the object directly into your file without creating a link"
> After I click "OK" I got this message in all my links:
[quoted text clipped - 90 lines]
>
> '&&&&&&&&&&&&&&&&&&&&&&&
maperalia - 01 Nov 2005 17:58 GMT
sMacropod;
Thanks for your quick response. I made the changes in my code with your new
statement. However, when I ran the program I noticed that the links has the
double back-slashes but when I click update link I got this message in all my
links:
"Error! No topic specified.
This error is different than before. I wonder if you can help me to find out
to fix this problem.
Best regards.
Maperalia
> Hi maperalia,
>
[quoted text clipped - 124 lines]
> >
> > '&&&&&&&&&&&&&&&&&&&&&&&
macropod - 01 Nov 2005 21:22 GMT
hi maperalia,
Seems I overdid the changes. All you need is:
linkcode.Text = linktype & Replace(sPath, "\", "\\") & linklocation
Cheers
> sMacropod;
> Thanks for your quick response. I made the changes in my code with your new
[quoted text clipped - 136 lines]
> > >
> > > '&&&&&&&&&&&&&&&&&&&&&&&
maperalia - 01 Nov 2005 23:00 GMT
Macropod;
Thanks very much it is working wonderful!!!!!!!!. I really appreciate your
supporting in this matter.
Best regards.
Maperalia
> hi maperalia,
>
[quoted text clipped - 154 lines]
> > > >
> > > > '&&&&&&&&&&&&&&&&&&&&&&&
maperalia - 03 Nov 2005 16:18 GMT
Macropod;
One last question. I have noticed that after I ran the macro all my links
get gray pattern. Althought this gray pattern does not show up in my prints
out. I wonder if I can I turn it off and on when is neccesary
Best regards
Maperalia
> Macropod;
> Thanks very much it is working wonderful!!!!!!!!. I really appreciate your
[quoted text clipped - 161 lines]
> > > > >
> > > > > '&&&&&&&&&&&&&&&&&&&&&&&
macropod - 05 Nov 2005 00:11 GMT
Hi maperalia,
The shading isn't caused by the macro - it's caused by your settings under
Tools|Options|View - 'field shading'.
Cheers
> Macropod;
> One last question. I have noticed that after I ran the macro all my links
[quoted text clipped - 169 lines]
> > > > > >
> > > > > > '&&&&&&&&&&&&&&&&&&&&&&&