Results 1 to 7 of 7

Thread: How do I rename this string?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    Nashville, TN
    Posts
    114

    Post

    Evening Gentlemen,

    I have a batch process program that I am creating, and I have hit a wall. I have a string that I created from a listbox and I need to rename it so the file will save as "samename" but with a .doc extension.

    'Here is the string with filename
    List2.list(cnr)

    newname = (List2.List(cnr)_______.doc

    Set swApp = Model.SaveAs2(newname, 0, True, True)

    Any help would be greatly appreciated

    Mike

  2. #2
    Member
    Join Date
    Jul 1999
    Location
    J-ville, NC
    Posts
    54

    Post

    Just use a & or + inbetween the name of the document and the extension.

    ------------------
    David Underwood
    Cannabatech Corporation

    ICQ - 14028049
    E-mail - [email protected]





    [This message has been edited by X_Darknight_X (edited 01-17-2000).]

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    Nashville, TN
    Posts
    114

    Post

    tried using this:

    newname as Object
    newname = (list2.list(cnr) + ".doc")

    I get a "object variable or with block variable not set" Error Message

    anything else to convert this please!!!!!


    Mike


  4. #4
    Lively Member
    Join Date
    Jan 2000
    Posts
    83

    Post

    not sure of your code i have something similar i wrote

    Filename = Filename & ".doc"

    that DOES work

    later,
    Iceman

  5. #5
    Lively Member
    Join Date
    Jul 1999
    Posts
    99

    Post

    that error means that the object variable "newname" does not exist.

  6. #6
    Lively Member Maartin's Avatar
    Join Date
    Jan 2000
    Location
    Benoni, Gauteng, South-Africa
    Posts
    99

    Post

    Copy the link below, past it into browser.
    When there download the file called junk.exe
    When done downloading, double click on it and it well extract itself.

    In there is a test project that will demonstrate how to do what i think you are trying to do.
    http://www.freedrive.com/ASP/PostFol...sp?fsc=2574178

    Hope it helps.


    ------------------
    -----------------------
    Maartin
    [email protected]
    -----------------------

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Location
    Nashville, TN
    Posts
    114

    Post

    Thanks marting the file helped show me the error of my ways.

    Mike

Posting Permissions

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



Click Here to Expand Forum to Full Width