Greetings. I have a drawn map in Word. Each section of the map is
hyperlinked to a document with the section's inventory. Is there any way
that I can make the hyperlink open within an area of the map? As it is the
hyperlink opens in a new full-sized window each time and it's rather annoying.

Also, should it prove do-able to display a document within a document, would
it be possible to be able to edit the displayed document (e.g. inventory
changes)?

Thanks

Re: Document within a document by Graham

Graham
Sun Dec 02 01:57:51 PST 2007

The short answer is no. However with a bit of lateral thinking you *may* be
able to achieve some measure of what you want with two documents - 1 blank -
called Blank.doc (right click in the folder that contains your other
document and create a new Word document - called Blank.doc), the other your
included document. Let's call it Doc1.doc.

If you set your map as a background image in Word you could place over it
where you want the document to display (it would have to be a short
document) a frame and in the frame insert an INCLUDETEXT field eg
{INCLUDETEXT "D:\\Path\\Doc1.doc"}

This will display your document within the confines of the frame (which is
why I suggested it would have to be a short document).

You can then toggle between the document with content Doc1 and the empty
document Blank using the following macro

Sub ToggleTextField()
Dim strCodes As String
Dim iFld As Integer
Dim strFind As String
Dim strRepl As String
strFind = "Doc1"
strRepl = "Blank"
strCodes = ActiveDocument.ActiveWindow.View.ShowFieldCodes
ActiveDocument.ActiveWindow.View.ShowFieldCodes = True
Selection.HomeKey
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type = wdFieldIncludeText Then
If InStr(1, .Code.Text, strFind) Then
.Code.Text = replace(.Code.Text, strFind, strRepl)
Else
.Code.Text = replace(.Code.Text, strRepl, strFind)
End If
.Update
End If
End With
Next iFld
ActiveDocument.ActiveWindow.View.ShowFieldCodes = strCodes
End Sub

http://www.gmayor.com/installing_macro.htm

Your document here Doc1 can be edited as any other and the changes will be
reflected when you run the macro.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Darkdrew wrote:
> Greetings. I have a drawn map in Word. Each section of the map is
> hyperlinked to a document with the section's inventory. Is there any
> way that I can make the hyperlink open within an area of the map? As
> it is the hyperlink opens in a new full-sized window each time and
> it's rather annoying.
>
> Also, should it prove do-able to display a document within a
> document, would it be possible to be able to edit the displayed
> document (e.g. inventory changes)?
>
> Thanks



Re: Document within a document by Darkdrew

Darkdrew
Sun Dec 02 02:36:00 PST 2007

Thank you for your reply. However, I have very little knowledge of frames
and macros. The closest I can get is to convert a text box to a frame, but
am unable to move it. Also, there are 23 documents linked to the map I drew
in Word. But 2 questions come up now:

1) Since the linked documents are inventory lists, if I put them into Excel
instead, would it be possible to display them as a table inside a box and
maybe have it editable?

2) Failing all else, is it possible to change the size of the window that
opens from the hyperlink so that it's not maximized?

Again, thank you for your efforts.

"Graham Mayor" wrote:

> The short answer is no. However with a bit of lateral thinking you *may* be
> able to achieve some measure of what you want with two documents - 1 blank -
> called Blank.doc (right click in the folder that contains your other
> document and create a new Word document - called Blank.doc), the other your
> included document. Let's call it Doc1.doc.
>
> If you set your map as a background image in Word you could place over it
> where you want the document to display (it would have to be a short
> document) a frame and in the frame insert an INCLUDETEXT field eg
> {INCLUDETEXT "D:\\Path\\Doc1.doc"}
>
> This will display your document within the confines of the frame (which is
> why I suggested it would have to be a short document).
>
> You can then toggle between the document with content Doc1 and the empty
> document Blank using the following macro
>
> Sub ToggleTextField()
> Dim strCodes As String
> Dim iFld As Integer
> Dim strFind As String
> Dim strRepl As String
> strFind = "Doc1"
> strRepl = "Blank"
> strCodes = ActiveDocument.ActiveWindow.View.ShowFieldCodes
> ActiveDocument.ActiveWindow.View.ShowFieldCodes = True
> Selection.HomeKey
> For iFld = ActiveDocument.Fields.Count To 1 Step -1
> With ActiveDocument.Fields(iFld)
> If .Type = wdFieldIncludeText Then
> If InStr(1, .Code.Text, strFind) Then
> .Code.Text = replace(.Code.Text, strFind, strRepl)
> Else
> .Code.Text = replace(.Code.Text, strRepl, strFind)
> End If
> .Update
> End If
> End With
> Next iFld
> ActiveDocument.ActiveWindow.View.ShowFieldCodes = strCodes
> End Sub
>
> http://www.gmayor.com/installing_macro.htm
>
> Your document here Doc1 can be edited as any other and the changes will be
> reflected when you run the macro.
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> Darkdrew wrote:
> > Greetings. I have a drawn map in Word. Each section of the map is
> > hyperlinked to a document with the section's inventory. Is there any
> > way that I can make the hyperlink open within an area of the map? As
> > it is the hyperlink opens in a new full-sized window each time and
> > it's rather annoying.
> >
> > Also, should it prove do-able to display a document within a
> > document, would it be possible to be able to edit the displayed
> > document (e.g. inventory changes)?
> >
> > Thanks
>
>
>