Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Apr 2012
    Location
    Massachusetts, USA
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    RD field needs full path? (Word 2013)

    This really shouldn't be that difficult The Word documentation seems clear, but I just cannot get this to work.

    I need to create an index of multiple files. I'm using the RD field.

    I tried it with the following RD statement, but when I run the TOC, it says it can't find the file. It's in the same directory as the file I'm in.

    { RD "Introduction.docx" }

    I notice that RD has a /f switch, so I tried all of the following combinations, but they don't work, either:

    { RD /f "Introduction.docx" }
    { RD "Introduction.docx" /f }
    { RD "/f Introduction.docx" }

    I can't hard-code the pathname because when I finish this project, the files will be moved to a different computer where someone else will pick up the project maintenance.

    Can anyone help? I looked at macropod's post http://windowssecrets.com/forums/sho...External-Files, and tried these, but they didn't work, either:

    { RD "{FILENAME /p}\..\Introduction.docx" }
    { RD "{FILENAME /p}\\..\\Introduction.docx" }
    Last edited by MM Sobo; 2014-09-09 at 12:02. Reason: Reference to macropod's post and example.

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    New Lounger
    Join Date
    Apr 2012
    Location
    Massachusetts, USA
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks, Charles. I did see the reference for RD, but, as I said, I couldn't get the /f to work.

    I tried all of the following combinations:

    { RD /f "Introduction.docx" }
    { RD "Introduction.docx" /f }
    { RD "/f Introduction.docx" }

    It must be something obvious, but I can't figure out what I'm doing wrong.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    Have you tried the BACKSLASH version of the switch?
    { RD "Introduction.docx" \f }
    Last edited by Andrew Lockton; 2014-09-09 at 18:31.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    New Lounger
    Join Date
    Apr 2012
    Location
    Massachusetts, USA
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Andrew Lockton View Post
    Have you tried the BACKSLASH version of the switch?
    { RD "Introduction.docx" \f }
    No, but just now I tried the forward slash and the backslash, one after the other, like this:

    { RD "Introduction.docx" \f }
    { RD "PayrollPolicies.docx" /f }

    Now they BOTH work!

    So I tried using two with the backslash, like this:

    { RD "JobTitle.docx" \f }
    { RD "StandardHours.docx" \f }

    That works, too!

    So maybe I should just stick with the backslash. Thanks!

  6. #6
    New Lounger
    Join Date
    Apr 2012
    Location
    Massachusetts, USA
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts
    As Homer Simpson would say, "D'OH!" I realize now that the RD reference says clearly to use a backslash; I just didn't see it. I knew it had to be something simple.

    Thanks again!

Tags for this Thread

Posting Permissions

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