Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
RRodrigues
 
Posts: n/a
Default get bookmarks from another document

How can I creat a cross reference to a bookmark from another document?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default get bookmarks from another document

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in message
...
How can I creat a cross reference to a bookmark from another document?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
RRodrigues
 
Posts: n/a
Default get bookmarks from another document

Thanks Jezebel.

However, that creates an Hyperlink.

What I need is to create a Ref to a bookmark which is in another document.

"Jezebel" wrote:

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in message
...
How can I creat a cross reference to a bookmark from another document?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default get bookmarks from another document

If you want document A to repeat the contents of a bookmark that's in
document B, then the field you want is an IncludeText field containing
the file path\name of document B and the bookmark name.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 2 Apr 2006 03:45:02 -0700, RRodrigues
wrote:

Thanks Jezebel.

However, that creates an Hyperlink.

What I need is to create a Ref to a bookmark which is in another document.

"Jezebel" wrote:

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in message
...
How can I creat a cross reference to a bookmark from another document?




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
RRodrigues
 
Posts: n/a
Default get bookmarks from another document

Thanks Jay!

That worked!

"Jay Freedman" wrote:

If you want document A to repeat the contents of a bookmark that's in
document B, then the field you want is an IncludeText field containing
the file path\name of document B and the bookmark name.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 2 Apr 2006 03:45:02 -0700, RRodrigues
wrote:

Thanks Jezebel.

However, that creates an Hyperlink.

What I need is to create a Ref to a bookmark which is in another document.

"Jezebel" wrote:

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in message
...
How can I creat a cross reference to a bookmark from another document?






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
RRodrigues
 
Posts: n/a
Default get bookmarks from another document

One more question...

How can I introduce a defined path in the instruction IncludeText, with a
VBA code?

I've made this code, but it doesn't work:

Dim Message, Title, MyValue
Message = "Whats report number?" ' Set prompt.
Title = "Reports" ' Set title.

MyValue = InputBox(Message, Title)
NameRep = MyValue & ".doc"

PathRel = "Z:\Word\2006\Reports" & NameRep

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"INCLUDETEXT PathRel [Mybookmark] " _


Can you help me with this, please?


"RRodrigues" wrote:

Thanks Jay!

That worked!

"Jay Freedman" wrote:

If you want document A to repeat the contents of a bookmark that's in
document B, then the field you want is an IncludeText field containing
the file path\name of document B and the bookmark name.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 2 Apr 2006 03:45:02 -0700, RRodrigues
wrote:

Thanks Jezebel.

However, that creates an Hyperlink.

What I need is to create a Ref to a bookmark which is in another document.

"Jezebel" wrote:

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in message
...
How can I creat a cross reference to a bookmark from another document?




  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default get bookmarks from another document

There are two things you need to fix:

- When you assign the value to PathRel, you need a backslash to separate the
path from the file name.

- For use in an IncludeText field, each backslash in the name must be
doubled.

So the line you need is

PathRel = "Z:\\Word\\2006\\Reports\\" & NameRep

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

RRodrigues wrote:
One more question...

How can I introduce a defined path in the instruction IncludeText,
with a VBA code?

I've made this code, but it doesn't work:

Dim Message, Title, MyValue
Message = "What's report number?" ' Set prompt.
Title = "Reports" ' Set title.

MyValue = InputBox(Message, Title)
NameRep = MyValue & ".doc"

PathRel = "Z:\Word\2006\Reports" & NameRep

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _ "INCLUDETEXT PathRel [Mybookmark] " _


Can you help me with this, please?


"RRodrigues" wrote:

Thanks Jay!

That worked!

"Jay Freedman" wrote:

If you want document A to repeat the contents of a bookmark that's
in document B, then the field you want is an IncludeText field
containing the file path\name of document B and the bookmark name.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 2 Apr 2006 03:45:02 -0700, RRodrigues
wrote:

Thanks Jezebel.

However, that creates an Hyperlink.

What I need is to create a Ref to a bookmark which is in another
document.

"Jezebel" wrote:

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in
message ...
How can I creat a cross reference to a bookmark from another
document?



  #8   Report Post  
Posted to microsoft.public.word.docmanagement
RRodrigues
 
Posts: n/a
Default get bookmarks from another document

I've already tried that, but it doesn't worked.

I've run the macro with the path directly in the instructiont:

"INCLUDETEXT "Z:\\Word\\2006\\Reports\\'Filename.doc' " [Mybookmark] "

and it worked fine.

But when I replace the path with the assigned value PathRel, it returns
"Error! Not a Valid Filename".

Can you tell me what I'm doing wrong, please?



"Jay Freedman" wrote:

There are two things you need to fix:

- When you assign the value to PathRel, you need a backslash to separate the
path from the file name.

- For use in an IncludeText field, each backslash in the name must be
doubled.

So the line you need is

PathRel = "Z:\\Word\\2006\\Reports\\" & NameRep

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

RRodrigues wrote:
One more question...

How can I introduce a defined path in the instruction IncludeText,
with a VBA code?

I've made this code, but it doesn't work:

Dim Message, Title, MyValue
Message = "What's report number?" ' Set prompt.
Title = "Reports" ' Set title.

MyValue = InputBox(Message, Title)
NameRep = MyValue & ".doc"

PathRel = "Z:\Word\2006\Reports" & NameRep

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _ "INCLUDETEXT PathRel [Mybookmark] " _


Can you help me with this, please?


"RRodrigues" wrote:

Thanks Jay!

That worked!

"Jay Freedman" wrote:

If you want document A to repeat the contents of a bookmark that's
in document B, then the field you want is an IncludeText field
containing the file path\name of document B and the bookmark name.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 2 Apr 2006 03:45:02 -0700, RRodrigues
wrote:

Thanks Jezebel.

However, that creates an Hyperlink.

What I need is to create a Ref to a bookmark which is in another
document.

"Jezebel" wrote:

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in
message ...
How can I creat a cross reference to a bookmark from another
document?




  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman
 
Posts: n/a
Default get bookmarks from another document

Sorry, I missed that the last time. The way you wrote the statement,
the word PathRel is a literal, a part of the string, when what you
want is the variable name. The statement that inserts the field should
be

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
Text:="INCLUDETEXT " & PathRel & "[Mybookmark] "

The & symbols (ampersands) are connectors to put together the pieces
of the string. The first piece is the word INCLUDETEXT and its space;
the second piece is the variable PathRel, which is replaced by the
value you previously assigned to it; and the third piece is the name
of the bookmark.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Mon, 3 Apr 2006 14:26:02 -0700, RRodrigues
wrote:

I've already tried that, but it doesn't worked.

I've run the macro with the path directly in the instructiont:

"INCLUDETEXT "Z:\\Word\\2006\\Reports\\'Filename.doc' " [Mybookmark] "

and it worked fine.

But when I replace the path with the assigned value PathRel, it returns
"Error! Not a Valid Filename".

Can you tell me what I'm doing wrong, please?



"Jay Freedman" wrote:

There are two things you need to fix:

- When you assign the value to PathRel, you need a backslash to separate the
path from the file name.

- For use in an IncludeText field, each backslash in the name must be
doubled.

So the line you need is

PathRel = "Z:\\Word\\2006\\Reports\\" & NameRep

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

RRodrigues wrote:
One more question...

How can I introduce a defined path in the instruction IncludeText,
with a VBA code?

I've made this code, but it doesn't work:

Dim Message, Title, MyValue
Message = "What's report number?" ' Set prompt.
Title = "Reports" ' Set title.

MyValue = InputBox(Message, Title)
NameRep = MyValue & ".doc"

PathRel = "Z:\Word\2006\Reports" & NameRep

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _ "INCLUDETEXT PathRel [Mybookmark] " _


Can you help me with this, please?


"RRodrigues" wrote:

Thanks Jay!

That worked!

"Jay Freedman" wrote:

If you want document A to repeat the contents of a bookmark that's
in document B, then the field you want is an IncludeText field
containing the file path\name of document B and the bookmark name.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 2 Apr 2006 03:45:02 -0700, RRodrigues
wrote:

Thanks Jezebel.

However, that creates an Hyperlink.

What I need is to create a Ref to a bookmark which is in another
document.

"Jezebel" wrote:

Use the Bookmarks button on the Insert Hyperlinks dialog



"RRodrigues" wrote in
message ...
How can I creat a cross reference to a bookmark from another
document?




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
Problems using document map kempofighter Microsoft Word Help 4 January 19th 06 04:33 PM
macros and SharePoint WSS document libraries [email protected] New Users 0 October 6th 05 03:42 AM
inserting a word document Penny Microsoft Word Help 4 September 14th 05 11:36 AM
Document Map Question PosseJohn Page Layout 2 March 23rd 05 01:27 PM
Newbie document question please Dudley Henriques New Users 4 January 9th 05 08:38 PM


All times are GMT +1. The time now is 08:54 AM.

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"