Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving a Word document without using dialogue box (Word 2003)

    I have a general Windows Macro called MacroExpress and this Macro is able to pull information from a database and put the information into a clipboard.
    What I would like to know is if I am able to name an UN-NAMED WORD document( obviously called Document 1- Microsoft Word) without having to open the "Save As" Dialogue Box. Oh, and the clipboard does have the address to place the file in its proper folder/directory.

    How do I get Word to name itself without using the "Save As" Dialogue Box?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving a Word document without using dialogue box (Word 2003)

    Welcome to Woody's Lounge!

    Visual Basic for Applications (VBA), the macro language built into Microsoft Word, can save a document without displaying the "Save As" dialog. Macro Express, however, works by recording keystrokes, mouse clicks etc. You could use Macro Express to send a series of keystrokes to Microsoft Word that displays the Save As dialog, supplies the file name, clicks the Save button and closes the document. The dialog will be displayed, but so briefly that it's hardly noticeable.

    Let's say that you want to save a new, unnamed document as C:WordTest.doc and close its window. The keystrokes needed for this are

    {Ctrl+S} C:WordTest.doc {Enter} {Ctrl+W}

  3. #3
    New Lounger
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving a Word document without using dialogue box (Word 2003)

    Hans,

    Thank you for your welcome. Thanks for having me here.

    I must tell you before I start. I am very novice in both programs. Still trying to learn my way. I know how to use Macro Express to do that.

    Can you point me in the right direction using VB script?

    Thanks!

    Pat

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Saving a Word document without using dialogue box (Word 2003)

    The VBA instruction to save the active document as C:WordTest.doc would be

    ActiveDocument.SaveAs "C:WordTest.doc"

    Instead of the literal string "C:WordTest.doc", you can also use a variable or an expression.

    If you want to call VBScript from within Macro Express, I'd need to know how you create/fill the document.

Posting Permissions

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