Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Request for ideas on linking a Document to a subdocument. 1

Status
Not open for further replies.

dw027

Technical User
Dec 10, 2001
26
US
I am working on a handbook for our organization to use as a training booklet internally as well as a handbook for our clients to understand / interface with us. Between the two documents are several sections that would be appropriate in both. Is there a way to link the documents so an update in the Team book would reflect in the client book?

For example the team book is in outline format
1
1.1
1.2
1.1.1
2
2.1
2.1.1

The client book could use
1
1.2
2.1
2.1.1

Is there a fast way to strip those setions automatically to reproduce the client version?

thanks
 
Hi,
How about if you tag the sections with a bookmark in the Team document and create a Client document that links (insert as Link) the Team document by the bookmarks for each section you want to imbed. There may be a better way. Oh, yes -- be certain that the text that you will be midifying (add, change delete) is within the bookmarked area.
Hope this may help. :) Skip,
metzgsk@voughtaircraft.com
 
Hi,
My suggestoin assumes that each major paragraph is a Section.
Here's a way to tag each Section with Bookmarks, named Section1, Section2, etc.
Code:
    Dim sBookmark As String
    
    For Each Section In ActiveDocument.Sections
        Section.Range.Select
        sBookmark = "Section" & Section.Index
        With ActiveDocument.Bookmarks
            .Add Range:=Selection.Range, Name:=sBookmark
            .DefaultSorting = wdSortByLocation
            .ShowHidden = False
        End With
    Next
Skip,
metzgsk@voughtaircraft.com
 
For a short time I could not get to the forum. However Skip was so helpful that I wanted to post this for the benefit of others.


REPLY FROM SKIP:

David,
Seems like their server is being swamped -- hence, the delays.
Bookmarks are a way to tag ranges of data. Here is what I sugggest (note
that 2, 3 & 4 can be done by the macro)...

1. Divide your main document into sections. I assume that you know how to
do that (if not I can help) You can make the section breaks either
Continuous or Page Break.

2. Put your document into View/Normal. That way you will be able to see the
section breaks.

3. Highlight all the text in one section, INCLUDING THE SECTION BREAK.

4. Insert/Bookmark Type a name (my macro made the name Section1 for the
first section, etc)

5. After inserting all your bookmarks, save the main document.

6. Open (or create) the subdocument.

7. Insert/File select the main document, click the Range button and type
the first bookmark name you want to include in the subdocument. Click the
Insert button and select Insert as Link.

8. Any time that you open the subdocument, you will need to select all text
and Edit/Links UpdateNow. Unfortunately, I have not figured out a way to do
that automatically. My expertise is in Excel.

You can cut and paste my procedure into Word VBA --
alt + F11 opens VBA
double click on the Document object, and in the General window type
sub Main
or any other name you would like for this macro.
In the row between
Sub Main

End Sub
paste the macro.
Running the macro adds bookmakr names for each section that you can use to
link to the subdocument. Hope this works for you. Let me know if I can be
of any further help.



-----Original Message-----
Thank you for your quick responses.

I am trying to build a quick mock up to understand the bookmark
functionality. The link makes sense however I don't see / know how to do
that. Also would the Client book be the "dumb" book that just shows the
links from the Main book or do I pull the bookmarks from the client book to
the main book. It would make more sense to work from the main book.


Your second suggestion is new to me. Is this a macro that I would run
against the main book? I have never used macros with word and very
limitedly with excel.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top