Results 1 to 5 of 5

Thread: Outlook (v2000)

  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Outlook (v2000)

    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 <mailbox name> with the actual
    'Exchange mailbox name created on your computer. For example:
    ' Nancy Davolio
    td.Connect = "Exchange 4.0;MAPILEVEL=Mailbox - <Doe, John>|;"

    'Within the following line, replace <drivepathdbname> 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=<I:ComplianceE_SignatureDocMgtSystem.mdb >;"

    'Within the following line, replace <profile name> with the actual
    'name of your email profile created on your computer. For example:
    ' Microsoft Outlook
    td.Connect = td.Connect & "PROFILE=<Auto Club Group>"

    '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?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Outlook (v2000)

    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?

  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook (v2000)

    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?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Outlook (v2000)

    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!

  5. #5
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outlook (v2000)

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

Posting Permissions

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