Results 1 to 3 of 3
  1. #1
    mirl98 is offline Novice
    Windows 10 Access 2007
    Join Date
    Feb 2020
    Posts
    2

    How to run MS Project macro through MS Access?

    Hello all,
    My team and I are developing an application in MS Access that opens an MS Project and copy its timeline view. We have a macro within MS Project that when we run, we are able to copy its timeline view. However, we want our MS Access application to allow managers to search an MS Project file, run its macro, and have the timeline view ready on their clipboard to paste.


    Is there a way to run a macro in MS Project from MS Access when opening a project file?
    Thank you.

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    As MS Project also uses VBA I am sure you can run that macro or a replacement VBA equivalent from Access using simple Office automation (OLE).
    https://docs.microsoft.com/en-us/off...timelineexport

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Since I do not have Ms Project , I do not know the exact object names.
    but its similar to this example:

    in VBE (alt-F11)in Tools ,References
    checkmark (add) the MsProject object library
    then the code will be like:
    Code:
    dim prj as MsProject.Application
    Set prj = CreateObject("MsProject.application")
    with prj
       .open  "c:\myProject.prj"
    end with

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 01-07-2016, 01:07 PM
  2. Replies: 1
    Last Post: 01-21-2015, 02:02 PM
  3. Replies: 8
    Last Post: 07-16-2014, 12:51 PM
  4. Replies: 2
    Last Post: 04-07-2014, 10:01 AM
  5. Replies: 4
    Last Post: 12-14-2013, 06:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums