• Outlook (v2000)

    Author
    Topic
    #425052

    We e-mail documents needng to be read and we need confirmation from the recipient that the materials were reviewed. Here are my 2 Q’s:

    – I have an automated e-mail procedure that works great. What line of code will allow me to ‘Use Voting Buttons:’ and the buttons I want to use is a single button: “I have reviewed the materials fully.”

    – I am then trying to link to the Inbox and capture replies from our employees using an append query. I would then move the e-mails to an ‘Archive’ folder. The code I am using is modified from Microsoft and I receive an error stating that it cannot find the inbox:

    >>>>>>>
    Dim db As DAO.Database
    Dim td As DAO.TableDef

    On Error GoTo Errorhandler

    Set db = CurrentDb()
    Set td = db.CreateTableDef(“tblInbox”)

    ‘Within the following line, replace with the actual
    ‘Exchange mailbox name created on your computer. For example:
    ‘ Nancy Davolio
    td.Connect = “Exchange 4.0;MAPILEVEL=Mailbox – |;”

    ‘Within the following line, replace with the
    ‘actual path to the database. For example:
    ‘ C:Program FilesMicrosoft OfficeOfficeSamplesNorthwind.mdb
    ‘This will also support UNC (for example, servernamesharedbname).
    td.Connect = td.Connect & “DATABASE=;”

    ‘Within the following line, replace with the actual
    ‘name of your email profile created on your computer. For example:
    ‘ Microsoft Outlook
    td.Connect = td.Connect & “PROFILE=”

    ‘Substitute the name of the email folder you wish to attach.
    ‘In this example, we will attach the Inbox folder.
    td.SourceTableName = “Inbox”

    db.TableDefs.Append td

    Application.RefreshDatabaseWindow

    MsgBox “Complete.”

    Exit Function

    Errorhandler:
    MsgBox “Error ” & Err & ” ” & Error
    Exit Function
    End Function
    >>>>>>>>>>>

    What am I doing wrong?

    Viewing 0 reply threads
    Author
    Replies
    • #978084

      1) You must use Automation (controlling Outlook from Access in VBA); when you have created a MailItem object, you can set its VotingOptions property, say

      objMailItem.VotingOptions = “I have reviewed the materials fully.”

      2) Do you have a particular reason for creating the link in code? Why not use File | Get External Data | Link Tables to link to the Inbox?

      • #978087

        Hi Hans,
        A simple link hit me after I clicked Post. I’m quitecertain I can use the link. My only problem is when I select File | Get External Data | Link Tables and set it to Outlook(), the screen flashed and it kicks me out of the Link table dialog box. IT Security is pretty tight around here…is there a setting that might cause the link dialog to automatically close or is there another way around this?

        • #978088

          In the code you attempted, you used a connection to Exchange. If you’re on Exchange server, try Exchange() as file type instead of Outlook.

          I don’t know whether the problem is caused by security, but if it is, you’d better talk about it with the IT department instead of trying to get around it – circumventing security could get you in real trouble!

          • #978091

            A cold boot fixed it. Also, the Voting buttons code worked perfectly.
            Thanks!

    Viewing 0 reply threads
    Reply To: Outlook (v2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: