Results 1 to 6 of 6
  1. #1
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Automation (2000)

    ... Anyone out these have some code that can launch MS Project form MS Access,save the MS Project File opened to an MS Access Database under a different name, and then close the MS Project Application.
    Regards,

    Gary
    (It's been a while!)

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Automation (2000)

    "launch MS Project form MS Access"

    did you mean
    launch MS Project <font color=blue>from</font color=blue> MS Access?
    cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Automation (2000)

    ... Yes, I meant from....
    Regards,

    Gary
    (It's been a while!)

  4. #4
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Automation (2000)

    Just wanted to be sure we were talking about the right thing <img src=/S/grin.gif border=0 alt=grin width=15 height=15>. Ok - since you'd be launching Project from access I think this question should go to the Access board. So if you let me know when you've posted the question over on the access board I'll create a link between the threads - so both Access and Project loungers can follow the thread without duplication.

    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  5. #5
    New Lounger
    Join Date
    Jun 2001
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automation (2000)

    Here is some code I am trying to get to work that opens project from Outlook. I don't use Access that much, but VBA is VBA so I assume it would be similar.

    Public Sub XferToProject()

    Dim osDescriptionBuffer As String
    Dim osSubjectBuffer As String
    Dim osComponentBuffer As String
    Dim osAssignedBuffer As String
    Dim odDateStartedBuffer As Date
    Dim osResponsibleBuffer As String

    Dim onMAPI As NameSpace
    Dim oiPRItem As Variant
    Dim ofPRS As MAPIFolder
    Dim oicPR As Items

    Dim iCount As Integer
    Dim iCountComp As Integer
    Dim oPRSType As Long
    Dim sMessage As String

    ' Set up nesc. stuff for Outlook
    Set onMAPI = Application.GetNamespace("MAPI")
    Set ofPRS = onMAPI.PickFolder
    Set oicPR = ofPRS.Items

    ' Set up nesc stuff for Project
    Dim pj As Object
    Dim pjcProjects As Projects
    Dim pjTestProject As Project
    Dim NewTask As Object

    Set pj = CreateObject("MSProject.Project")
    Set pjTestProject = pj.Application.Projects.Add

    ' loop through prs
    For Each oiPRItem In oicPR
    If oiPRItem.UserProperties("PR:State") <> "Closed" Then
    If oiPRItem.UserProperties("PR:State") <> "Fixed" Then
    If oiPRItem.UserProperties("PR:State") <> "Information only" Then
    Set NewTask = pjTestProject.Tasks.Add
    NewTask.Name = oiPRItem.UserProperties("PR:Subject")
    NewTask.Notes = oiPRItem.UserProperties("PRescription")
    ' NewTask.Resources = oiPRItem.UserProperties("PR:Assigned")
    End If
    End If
    End If
    Set NewTask = Nothing

    Next



    iCountComp = ofPRS.Items.Count

    sMessage = "icount = " & iCount & "/nicountcomp = " & iCountComp

    MsgBox sMessage


    End Sub

  6. #6
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Automation (2000)

    Thanks for the information.
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

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