Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    IncludeText (2002/SP1)

    I have two documents - the first contains a series of tables that are all bookmarked.
    The second contains IncludeText fields that link to these bookmarked tables. Within the second document the IncludeText fields are duplicated in various places. This is so that the information in the tables can be inserted and updated in the second document in various places.

    This seems to work, most of the time, but as I am building the second document I am starting to get an error saying "Error - not a valid filename"
    I now the filename is valid, and originally the IncludeText field seemed to be working without any problems.

    Does anyone know of any issues with the IncludeText field that perhaps doesn't like having multiple instances of these within a document, or any other "gotchas"?

    Cheers,

  2. #2
    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 (2002/SP1)

    Hi Karen:
    Are you using the full filename path in the IncludeText field? I have found that you can use either the double backslash "" or a single forward slash "/" to separate folders, subfolders, & filename. However, it seems that Word works better with the absolute path (at least on my documents). <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Also, I assume that when you insert corrections manually in the second document, that you are using Ctrl+Shift+F7 to update the source. Does saving the document help? I'm just thinking out loud. I know that Word saves edits in temp files & then renames them to the original filename when you save the changes. One would think that this wouldn't confuse Word, but... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: IncludeText (2002/SP1)

    Hi Phil,
    I've just changed the codes and put in the full file path - using as a separator. I'm hoping this will be more stable than assuming that because the files are in the same folder I don't need the full path. I have also used the switch ! that (hopefully) will mean we can't modify the field in the second document and have it updating the original.
    Thanks for your thoughts however.

    Karen

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: IncludeText (2002/SP1)

    Hi Karen,

    The ! switch doesn't prevent the field in the target document being used to update the source via Ctrl-Shift-F7. It only stops fields within the source document being updated. Equally, if you edit one of the linked fields in the target document and don't update the source via Ctrl-Shift-F7, the edit will be lost next time the INCLUDETEXT field is updated (eg via F9, 'Update automatic links at open' or 'Update links' off the Tools|Options menu).

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    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 (2002/SP1)

    Hi Karen:
    I'm afraid that putting in the ! switch will not prevent the source document from being updated. That only prevents fields from the source document from updating to the target properties. e.g. a {printdate} field that is in the Includetext field will reflect the date that source document was printed rather than the target document if you use the ! switch.

    To prevent changes to the source document, make it read only. Then if the user presses Ctrl+Shift+F7, the SaveAs dialog box will appear so they can save changes to a new document. Or you can protect the source document for forms. Then updates will not be allowed when pressing Ctrl+Shift+F7.
    Hope this helps,

  6. #6
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IncludeText (2002/SP1)

    Hi Karen,

    You can use relative pathnames in the IncludeText fields, but Word always looks for the files "relative" to the current File->Open path. If you get the "Error! not a valid filename" error, try going to File->Open, and navigate to the folder where the files are located. (then just press cancel)

    If that does the trick, you can explore some options for doing that from an auto macro.

    HTH,

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: IncludeText (2002/SP1)

    Hi Andrew - I thought that might be what is happening. I've managed to get around that however, by having code that updates the path with the full path name (this varies from doc to doc). I wish MS help had proven as useful as logging on to the lounge :-)

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: IncludeText (2002/SP1)

    Thanks Phil, I'll play around to see what I get but I think my major problem will be if a user accidentally deletes the field code - and that I can live with and provide an easy way for the user to reinsert the field.

  9. #9
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: IncludeText (2002/SP1)

    Hi Karen,

    If you're likely to have the paths to some or all of the source docs changing from time to time, you might find the utility in <post#=261488>post 261488</post#> useful.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  10. #10
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: IncludeText (2002/SP1)

    Thank you macropod - I did do a search on include text fields but didn't see the May thread. Wish I had ... Anyway, looking forward to going through the utility. I have actually written a macro that when you are in the open target document, retrieves the path only, replaces the with and inserts this into the numerous includetext field codes in the target document and then updates.

    It would also be nice if the Microsoft Word Help files listed the limitations of using relative paths!

Posting Permissions

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