Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Upstate, South Carolina, USA
    Posts
    253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forms Code Runs on One System but not Another (XP 5.1, O2000, Outlook SR-1

    The following code snippet runs just fine on two configurations:

    <UL><LI>XP 5.1 & O2002
    <LI>W2K & O2000[/list]However, on the "XP 5.1, O2000, Outlook SR-1" configuration, clicking on the button on the form produces no results. I figure that it's something I have set up in Outlook incorrectly but I cannot figure it out.

    Thanks for any insights, - Al

    <pre>Sub cmdGetInfo_Click()

    Dim olemsg ' MAPI namespace
    Dim tName ' Name of each infostore -- "Public Folders," "Mailbox -" and any
    ' open PST files.
    Dim myMsgBox ' Used to display a MsgBox
    Dim ShowThisOne ' "True" if user accepts of an infostore
    Dim opInfo ' Pages collection available in the form

    Set opInfo = item.GetInspector.ModifiedFormPages("Information Store Details")
    Set olemsg = Application.CreateObject("MAPI.Session")
    olemsg.Logon "", "", False, False, 0

    Select Case Err.Number
    Case -2147221231
    olemsg.Logon "", "", True, True, 0
    If Err = -2147221229 Then
    MsgBox "Login cancelled"
    Exit Sub
    End If
    Case Else
    'Do nothing
    End Select

    For i = 1 To olemsg.infostores.Count
    tName = ""
    ShowThisOne = False
    tName = olemsg.infostores.item(i).Name

    ' Do not process the "Public Folders" folder. Prepend the string
    ' "Personal Folders File - " to each open PST file. Get user's acceptance
    ' or rejection to process folder.
    If Not Left(tName, 14) = "Public Folders" Then
    If Not Left(tName, 7) = "Mailbox" Then tName = & _
    "Personal Folders File - " & tName
    myMsgBox = MsgBox("Include results for '" & tName & "'?", _
    vbYesNo, "Information Store Usage")
    ' vbYesNo = 6 = Yes

    End If

    Next

    End Sub 'cmdGetInfo_Click</pre>

    Al
    "Do or do not do. There is no try." -- Yoda
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Forms Code Runs on One System but not Another (XP 5.1, O2000, Outlook

    The MAPI library is different in Outlook 2000 depending on whether you have Internet Only or Corporate Workgroup, with the latter having richer functionality. If you have OL2K set up for CW, then that probably isn't your problem, and I don't have any other thoughts at the moment.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Upstate, South Carolina, USA
    Posts
    253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms Code Runs on One System but not Another (XP 5.1, O2000, Outlook

    Thanks. All three systems are set up for CW.
    Al
    "Do or do not do. There is no try." -- Yoda
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>

Posting Permissions

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