Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Drew Drew is offline
external usenet poster
 
Posts: 26
Default Link a Field to an Embedded Worksheet & have the link follow "save

This has to be the most frustrating thing I've seen. The application is
almost there... It seems like this would be the logical next step.

I started by created an .xls and linking about 20 fields in my .doc to the
..xls. Everything was working great until I needed to change the file names
from "template" to "[clientname]".

I realized that if I have the template.doc open with all the links
auto-updating, and I SAVE AS the .xls, most of the links follow the new .xls
file name. Then I can Save As the .doc and ta-da. But it wasn't perfect and
sometimes the links did not follow the filename.

So then I got the idea of embedding a worksheet as an object into the .doc
and link to it instead of linking to a source file. But the Link needs to
refer to the path of the document and then to the objectID and r/c
referrence. If I Save As the .doc, none of the links follow the new
filename. They all still link to the full path of "c://mydoc//template.doc"
_12345Sheet!rXcY.

One, is there a better way to accomplish what it is I'm trying to do?

Two, is there a way to set up a link so that the path is the current
document name regardless of the name of the current document?

Thanks a million in advance.

- Drew


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Link a Field to an Embedded Worksheet & have the link follow "save

Hi ?B?RHJldw==?=,

This has to be the most frustrating thing I've seen. The application is
almost there... It seems like this would be the logical next step.

I started by created an .xls and linking about 20 fields in my .doc to the
..xls. Everything was working great until I needed to change the file names
from "template" to "[clientname]".

I realized that if I have the template.doc open with all the links
auto-updating, and I SAVE AS the .xls, most of the links follow the new .xls
file name. Then I can Save As the .doc and ta-da. But it wasn't perfect and
sometimes the links did not follow the filename.

So then I got the idea of embedding a worksheet as an object into the .doc
and link to it instead of linking to a source file. But the Link needs to
refer to the path of the document and then to the objectID and r/c
referrence. If I Save As the .doc, none of the links follow the new
filename. They all still link to the full path of "c://mydoc//template.doc"
_12345Sheet!rXcY.

One, is there a better way to accomplish what it is I'm trying to do?

Two, is there a way to set up a link so that the path is the current
document name regardless of the name of the current document?

In a nutshell: to have this work reliably, without user intervention, you need
to use VBA (program a macro).

In general, the first approach, with the separate Excel file, is going to be
more stable and easier to maintain (although not to distribute). If the links
are all "in-line" with the text, you can do Alt+F9 (display field codes),
Find&Replace for the new path and/or file name, Alt+F9 (hide the field codes).

Another approach is to create a custom document property with the information,
then use a DocProp field within the LINK fields to bring in the full path. This
has the advantage of being able to make the change in just the one place for the
entire document.

Either of these techniques can be automated using VBA.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link a word field to an excel spreadsheet Matt Microsoft Word Help 1 January 26th 05 07:37 PM
Relative path in LINK field ? Timvdv Microsoft Word Help 2 January 17th 05 11:41 AM
cltr + to follow link UKPUPPYDOG68 New Users 1 January 11th 05 08:07 PM
link field / forms Lisa Microsoft Word Help 2 December 30th 04 09:35 PM
Can I link Excel Worksheet objects in Word? CharlotteCorke Microsoft Word Help 1 December 9th 04 01:22 PM


All times are GMT +1. The time now is 02:06 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"