Results 1 to 3 of 3

Thread: VB and Word and Save as[Resolved]

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    Virginia
    Posts
    4

    VB and Word and Save as[Resolved]

    I'm a newbie, and I've searched and I've searched, and I have not found an answer to this question:

    I have a vb program that is writing to a Word Document. What I would like to do is automate the naming of the document on the SaveAs function so that it takes the name of the document from a textbox.

    Is there any way to insert txtName.text as the filename where the question marks are?


    Code:
    .ActiveDocument.SaveAs App.Path & "C:\My Documents\ ????
    Thanks for the help!
    Last edited by ProsthtkReality; Jan 14th, 2004 at 11:23 AM.

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    think you want something like this :

    VB Code:
    1. .ActiveDocument.SaveAs "C:\My Documents\" & txtName.text

    ps I removed the app.path no use having that if you add C:\My documents after it...

    -= a peet post =-

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    Virginia
    Posts
    4
    Worked like a charm! Thanks!

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