Share via

Reference to Current Directory

Anonymous
2011-08-05T16:58:50+00:00

Trying to produce a Word Document that is capable of grabbing information from an Excel Document, but I need the reference in the format of(Current Directory) "Excel Doc.xlsx" being that I want to have the documents generated off templates and be able to change them after that point. I see no option to do this, so right now, after generating these templates - its still referencing to the template folder which is in a different directory. Any help is appreciated.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2011-08-08T17:54:05+00:00

    The file hierarchy is something like this...

    New Listing Creation

    • Residential
    • *Template Files
    1. **Data Source.xlsx
    2. **Document.docx
    • *New Listing Name
    1. **New - Data Source.xlsx
    2. **New - Document.docx
    • New Listing.bat (copies template files /renames into new folder)

    Trying to get that the references to the Data Source to be "Residential / New Listing Name / New Listing Data Source" and not the original reference to "Residential / Template Files / Data Source"

    EDIT: It removed my tabs.

    EDIT2:

    Batch script below if it helps.

    @echo off

    set /p Name=Enter The Property Address:

    cd "Residential"

    md "%Name%"

    xcopy "Template Files" "%Name%" /E

    cd "%Name%"

    rename "Document.docx" "%Name% - Document.doc"

    rename "Data Source.xlsx" "%Name% - Data Source.xlsx"

    @echo New Directory "%Name%" Created.

    start " " ""

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-08-06T04:48:48+00:00

    If both word and excel are in same folder then it would display the current directory, However where are the templates saved?

    Was this answer helpful?

    0 comments No comments