DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: Word Macro

  1. #1
    Rich Guest

    Word Macro


    Hi all
    I have been asked to produce a macro that will take a word document from
    a specific location open it, print it and delete.

    Sounds easy, but the problem I have is that the name of the document(s) in
    the specific location will not be known. I think the best approach would
    be to loop though the files in the directory, print them all out and delete
    them one by one. Is this possible?

    Also the macro will need to work every five minutes or so is there a way
    of leaving word open and having the macro run every 5 minutes without someone
    starting it?

    Any help on these matters will be much appreciated.
    Rich

  2. #2
    Paul Clement Guest

    Re: Word Macro

    On 11 Sep 2001 06:12:44 -0700, "Rich" <Richard.Bowen@logobrand.com> wrote:

    ¤
    ¤ Hi all
    ¤ I have been asked to produce a macro that will take a word document from
    ¤ a specific location open it, print it and delete.
    ¤
    ¤ Sounds easy, but the problem I have is that the name of the document(s) in
    ¤ the specific location will not be known. I think the best approach would
    ¤ be to loop though the files in the directory, print them all out and delete
    ¤ them one by one. Is this possible?

    Yes, you can use the Dir function to iterate through the files in a specific folder.

    ¤
    ¤ Also the macro will need to work every five minutes or so is there a way
    ¤ of leaving word open and having the macro run every 5 minutes without someone
    ¤ starting it?

    Take a look at the Controls section at http://www.mvps.org/vb/. There should be a Timer component
    you can use to do this.


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

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
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links