Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 40
  1. #16
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Thanks for trying. It would be nice to have a seemless way that would work. I even tried:
    { includetext "{ HYPERLINK "Source.doc" }" }
    since the hyperlink field alone would always work when I moved both the source & target documents. But, alas, this returned an error also.

  2. #17
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,890
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi Phil,

    I've found one way of doing this, but it's a bit ugly:
    In your source document, create a TOC field such that the whole of the text appears in the TOC. You might do this by including style references via the t switch, and eliminating page numbers with the n switch.
    In your target document, create a new TOC and append an RD field to the end of it, naming the source document. RD fields allow relative referencing via the f switch so, if you keep both documents in the same folder, or they are transported within the same folder heirarchy, everything should work OK.

    As I said, though, it's a bit ugly.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #18
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi macropod:
    This is an interesting solution. Yes, it does tend to work. The only limitation is that the source document (or at least the part that you want to appear in the target document) must be in a certain style. This limits the formatting of the source document. However, it does work with graphics & is useful if you have a bunch of illustrations, each in a separate file. But this is a neat trick that I want to tuck away. Thank you.

  4. #19
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,890
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi Phil,

    Actually, I found that I could include as many styles from the source document as I wanted. All I had to do was nominate each syle with the t switch in both the source and target documents.

    Another limitation that I forgot to mention earlier was that I couldn't get it to reproduce graphics etc unless they were in-line. It's not clear from your last reply whether you encountered this also.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #20
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    <P ID="edit" class=small>(Edited by Phil Rabichow on 06-May-03 11:42. )</P>Hi macropod:
    Yes, I found that graphics that weren't inline couldn't be brought over. It seems that if you have text that's in the same style in both the source & target documents that the RD field is bringing over both. However, I'm getting inconsistent results. Do you think you can look at the two files that I've attached?

    Later:
    I seem to come up with these rules, but I've been looking at them for so many hours that my mind is mush. Do you agree with the below statements or do you think they are incorrect or incomplete?

    To use a combination of TOC & RD fields to simulate an INCLUDETEXT field:
    1. You must create a style or styles in the source document.
    2. A TOC field must be inserted, using the n switch to suppress page numbers & the t "StyleName" switches for each style to be included. It's syntax is:
    {toc n t "SourceStyle1" t "SourceStyle2"} etc.
    3. The styles referenced by the TOC must be copied to the current document. There needn't be any paragraphs of that style in your target document, but it must exist in the Format/Styles
    Attached Files Attached Files

  6. #21
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Phil

    As a latecomer to this discussion can you try this and see if it works on your machine. It seemed to do the trick on my Word 2000 box. I didn't test it with a bookmark but using the old dos trick of going up a level and then coming back in appears to work here.

    Instead of the too simple field of {INCLUDETEXT "Chapter 1.doc" bmk1 !} that SHOULD work - what if the link looked like {INCLUDETEXT "..Chapter 1.doc" bmk1 !}

    Note: I didn't test this at the root level of the drive and don't know what you get if this is the case.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #22
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,890
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi Andrew,

    I've just tried this with the files Phil posted .. and it didn't work. Adding the .. before the filename made no difference to the error message. Nor did having only one dot (eg .Source.doc or .Source.doc) with or without the quotes.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #23
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,890
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    <P ID="edit" class=small>(Edited by macropod on 07-May-03 13:04. See Footnote)</P>Hi Phil,

    Glad you've made progress with this. I think I can add that no graphics will be imported via this process.

    As for there being only one RD field, I think you might be able to have more provided the styles referenced by the associated TOC are unique to that TOC. I haven't tried it yet, though.

    Cheers

    Footnote:

    Further testing reveals that in-line graphics are imported but, even if TOC fields in source apply to only only style each, and the corresponding RD fields in the target reference only one style each, each RD field gets duplicate records.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  9. #24
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hmm

    Now that I retest it, I can't get it to work either. When I tried it before I had several fields with different variants and adding the .. worked, or so I thought, but now the added path information isn't working at all.

    I guess this is the reason I am not a software tester <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  10. #25
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi Andrew:
    Thanks for the information. I can get it to work when I first create both files & if I set the File/Open... dialog to the same folder that both the source & target are in. After that, they don't update when you move them. The RD fields will, except sometimes. I put a source & target document in the same folder, used relative paths with the RD field. Then I moved the Source.doc to C: & the target.doc to C:Windows or to Cata. I used the syntax:

    { RD "..Source1.doc" f }

    & it worked. I could actually use { RD "Source1.doc" f } & it worked, too. But when I closed & reopened the target.doc, it put back the 2 dots by itself.

    The TOC & RD is an interesting approach, certainly not what RD fields were intended for. It would be nice for the Includetext fields to update relative links, like the RD field. Something for the wish list.

  11. #26
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,890
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi Phil,

    Remember:
    <hr>It would be nice for the Includetext fields to update relative links, like the RD field. Something for the wish list.<hr>
    Because I need something to cope with drive/folder changes on a network drive, I've coded the attached to update INCLUDETEXT links for target files located in the same folder as their source files.

    More work could be done to allow the user to nominate the path, but I don't need that right now. Code could easily be modified to work with other field types too.

    Cheers
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  12. #27
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Nice job!! <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> I only tested it with text, but it worked fine. I did find that it caused Word to crash, if I changed the source filename without changing it in the field, but my system is acting funny lately, with several crashes.

    I do have two questions though.
    1. I did not see the purpose of the QUOTE field. Changing this to anything else did not affect the behavior of the document.
    2. I found that I could change the SET field to anything without affecting the document. i.e. putting in an invalid filename & path didn't seem to change anything, so I'm not clear what the path is for.

  13. #28
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,890
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi Phil,

    The QUOTE & SET fields don't have any particular use - they're left-overs from testing to make sure that only INCLUDETEXT fields were modified.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  14. #29
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Ah, well that's different. This is fantastic. <img src=/S/clever.gif border=0 alt=clever width=15 height=15> <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

  15. #30
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,890
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Includetext Field & Relative Paths (Word 2000/SR-3)

    Hi Phil,

    MKII attached - now includes code (I scrounged it from somewhere then modified it to suit) to select the source folder.

    Cheers
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •