Results 1 to 4 of 4

Thread: Project VBA - Open each file in a folder and make a change to each

  1. #1
    Join Date
    May 2007
    Posts
    1

    Project VBA - Open each file in a folder and make a change to each

    We have a series of 250+ MS Project files that were built off of a certain template. Now there is a need to make changes to the templates & all the 250+ existing files that are out there. Rather than having to open every file and do it manually, is there a VB script that will:

    - Open all MS Project files in a certain folder one by one
    - As each file opens, write certain changes
    - Save changes to current file
    - Close current file
    - Open next file & repeat until all have been updated

  2. #2
    Join Date
    Jan 2006
    Posts
    6,878

    Re: Project VBA - Open each file in a folder and make a change to each

    I've written this many many times. Look up the help for the VBA.Dir function, it has an example and all.

  3. #3
    Join Date
    Dec 2008
    Posts
    1

    Re: Project VBA - Open each file in a folder and make a change to each

    I have same issue and couldn't locate the sample macro Jan mentioned

  4. #4
    Join Date
    Jan 2006
    Posts
    6,878

    Re: Project VBA - Open each file in a folder and make a change to each

    In order to access each mpp file in a folder use the following

    Anaddress=vba.dir(folderaddress\*.mpp)

    While not on len make it (anaddress)=0

Similar Threads

  1. File not found error on open and closing project file
    By Umedd in forum Microsoft Project
    Replies: 4
    Last Post: 30-03-2012, 07:46 PM
  2. How to open a MS project 2007 file in MS project 2010
    By pqmot in forum Windows Software
    Replies: 3
    Last Post: 30-12-2010, 04:41 PM
  3. Can't open a project 2007 file I created
    By sayeed in forum Microsoft Project
    Replies: 4
    Last Post: 22-07-2009, 08:59 PM
  4. Can i Make Autorun.ini Open a txt File???
    By Abalakin in forum Windows Software
    Replies: 4
    Last Post: 01-04-2009, 10:25 PM
  5. Set or change file and folder security settings
    By Deep23 in forum Networking & Security
    Replies: 3
    Last Post: 09-02-2009, 11:09 AM

Tags for this Thread

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
  •  
Page generated in 1,713,481,319.09967 seconds with 17 queries