+ Reply to Thread
Results 1 to 5 of 5

Macro to rename .doc

  1. #1
    InventoryQueryGuy
    Guest

    Macro to rename .doc

    Hi,
    I'm hoping that I can get some help here. I haven't written an excel macro
    before. There is one goal that I am trying to accomplish:
    I have two colums in a table, Old_Number and New_Number, then I have a
    separate file with word documents that are named and saved under the old
    number. Now there is not an Old_Number for every New_Number.

    Is it possible to run down the Old_Number column, and everywhere that a
    value appears, to have excel open up that particular document and perform a
    'save as' function under the name of New_Number, maybe even into a new folder?

    Any input is much appreciated

  2. #2
    Ron de Bruin
    Guest

    Re: Macro to rename .doc

    See the Name function
    http://www.rondebruin.nl/folder.htm

    You can loop through your list and name the files

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "InventoryQueryGuy" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I'm hoping that I can get some help here. I haven't written an excel macro
    > before. There is one goal that I am trying to accomplish:
    > I have two colums in a table, Old_Number and New_Number, then I have a
    > separate file with word documents that are named and saved under the old
    > number. Now there is not an Old_Number for every New_Number.
    >
    > Is it possible to run down the Old_Number column, and everywhere that a
    > value appears, to have excel open up that particular document and perform a
    > 'save as' function under the name of New_Number, maybe even into a new folder?
    >
    > Any input is much appreciated




  3. #3
    Harald Staff
    Guest

    Re: Macro to rename .doc

    You don't have to open documents to rename/move them. Try something like

    Sub test()
    Name "C:\Temp\Book1.xls" As "C:\Data\Pornsong.mp3"
    End Sub

    HTH. Best wishes Harald

    "InventoryQueryGuy" <[email protected]> skrev i
    melding news:[email protected]...
    > Hi,
    > I'm hoping that I can get some help here. I haven't written an excel macro
    > before. There is one goal that I am trying to accomplish:
    > I have two colums in a table, Old_Number and New_Number, then I have a
    > separate file with word documents that are named and saved under the old
    > number. Now there is not an Old_Number for every New_Number.
    >
    > Is it possible to run down the Old_Number column, and everywhere that a
    > value appears, to have excel open up that particular document and perform

    a
    > 'save as' function under the name of New_Number, maybe even into a new

    folder?
    >
    > Any input is much appreciated




  4. #4
    Harald Staff
    Guest

    Re: Macro to rename .doc

    Very nice article, Ron.

    Best wishes Harald

    "Ron de Bruin" <[email protected]> skrev i melding
    news:%[email protected]...
    > See the Name function
    > http://www.rondebruin.nl/folder.htm




  5. #5
    Ron de Bruin
    Guest

    Re: Macro to rename .doc

    Thanks Harald

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "Harald Staff" <[email protected]> wrote in message news:%[email protected]...
    > Very nice article, Ron.
    >
    > Best wishes Harald
    >
    > "Ron de Bruin" <[email protected]> skrev i melding
    > news:%[email protected]...
    >> See the Name function
    >> http://www.rondebruin.nl/folder.htm

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1