Results 1 to 10 of 10
  1. #1
    Lounger
    Join Date
    May 2002
    Location
    Wytheville,VA, Virginia, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send message w/ different versions of Outlook (Acc97 SR2)

    I have a db that allows people to send emails when appropriate. Most everyone here uses A97 but there are a few that have Office2K and XP. I have installed A97 in an alternate directory on these machines and set the path of the shortcut to use the older version. No problems with that part. I use the SendMessage module (see attachment) to get around the different versions of Outlook. The problem I have is that when one of the users sends an e-mail (I think it is the XP machine), there is a reference added to the code for Outlook 10.0 and points to the Office directory for that machine. When someone else sends an e-mail, they get the missing reference message. Is there a better way around this? I already have 2 different submit buttons, one for Outlook and one for Outlook Express and I still have to explain the difference to the users.
    I saw another post that made reference to a 3rd party option. Any thoughts?

    I thought about copying the file that A97 uses to the same directory on all the other machines to try and "trick" Access and Outlook, but that seems a little far-fetched.
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    This issues was discussed in WAW of Dec 18. the following workaround was suggested;
    <pre>All you have to do is uncheck the references to the Office 10 object libraries, and replace them with
    references to the Office 9 object libraries, while the Access 2000 database is open in Access 2002.
    Once you have set a reference to Word 9.0, Outlook 9.0, or whatever other Office component you need in
    Access 2002, you can alternately open the database in Access 2000 and Access 2002, without reference errors.
    </pre>


    I imagine you could set the references back to the relevant 97 references instead.
    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    Is this database perchance on a shared folder instead of local to each machine? That might cause you some grief because if you set the references for one machine that runs it, it will be broken for another. That's one of the reasons shared front ends are not recommended. Another issue is how Outlook was installed on the several machines. If it was installed to run IMO, then you may run into problems trying to automate it like that. Make sure Outlook is installed consistently (even if the versions are different) on the machines involved, and be especially careful of Office 2000 and Office XP machines, where the CDO library is not installed by default, even though Outlook is installed.
    Charlotte

  4. #4
    Star Lounger
    Join Date
    Dec 2001
    Location
    Fredensborg, Denmark
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    I have looked at your code and think this may help you. If you use late binding then you do not need a reference to the Outlook Object Library in your Access application. I think this method will solve your problem.

    Replace your Dim-statements defining the Outlook objects by the lines of code shown below:

    '****** start of code
    ' When you set Development = True you need to add a reference to
    ' the MS Outlook xx.x Object Library.
    ' When you set Development = False you don't need the reference.
    #Const Development = False
    #If Development = True Then
    ' Define Outlook objects
    Dim objOutlook As Outlook.Application
    Dim objOutlookMsg As Outlook.MailItem
    Dim objOutlookRecip As Outlook.Recipient
    Dim objOutlookAttach As Outlook.Attachment
    #Else
    ' Define Outlook constants
    Const olTo = 1
    Const olCC = 2
    Const olBCC = 3
    Const olMailItem = 0
    ' Define Outlook objects
    Dim objOutlook As Object
    Dim objOutlookMsg As Object
    Dim objOutlookRecip As Object
    Dim objOutlookAttach As Object
    #End If
    ' ****** end of code

    While developing you should set the conditional compilation constant Development = True.
    This will allow you to use Outlook Object Library defined constants (olConstants) without getting compilation errors.
    Once your code works, you can remove the reference to the Outlook Object Library and set Development = False.
    At this point if you get compilation errors because you have added olConstants you will have to define them the way I have done above.
    You can find their value by temporarily setting a reference to the Outlook Object Library again and then use the Object Browser to search for them. Click the constant and you will see its value in the bottom part of the Object Browser display.
    If you have not tried to use the Object Browser before - it's time to get started. You will love it. Just press F2 from the module editor and you are ready.

    Hope it helps.

  5. #5
    Lounger
    Join Date
    May 2002
    Location
    Wytheville,VA, Virginia, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    Hi all and thanks for the replies.
    First of all, for John:
    I don't know what a WAW is. Is that some public reference or just a newsletter that comes complete with a secret handshake, or what? I'm actually not using the higher versions of Access to open the db. I'm using A97 to open it on all machines. The problem is that they have the different versions of Outlook. I did, however, un-check the references and it seems OK, but I don't think that the XP user has had to use it since (it's been about a week).

    For Charlotte:
    Yes, this is in fact on a shared folder. I had considered making different front ends, but there are a couple of issues with that. One, I didn't want to have to update it 3 times every time something changed. Two, there is a coded autonumber-type field that issues a calculated number (it's a PO request db). So it looks at the highest number in the number part of the field and adds one to it. I don't know how to fix it so that more than one person can use it at a time. Therefore, I have a batch file that checks to see if there is a corresponding ldb file, and either returns a message saying that the db is unavailable, or opens it. If I split the db, it seems like it would be harder to pull that off.
    IMO is another acronym I'm not familiar with. How does Outlook run "IMO"?

    For Claus:
    What are the # signs for? I've never seen that before. I'll have a closer look at your code sample and see if I understand it well enough to give it a try. I can see right off that I don't know what you're talking about by setting Development=True or False. I do appreciate the code sample just the same as well as the tip about the object browser. I'll have to play with that and see what I can find.

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    In response to the first question, WAW is Woody's Access Watch which you can get to via http://woodyswatch.com/access/. It is a newsletter about Access written (mostly) by Helen Feddema, and you can subscribe to it on the hope page of wopr.com.
    Wendell

  7. #7
    Star Lounger
    Join Date
    Dec 2001
    Location
    Fredensborg, Denmark
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    I am sorry if I have confused you, Chico. To get right to the point: what I guess you need right now is this part of my code to avoid a reference to the Outlook Object Library:

    ' Define Outlook constants
    Const olTo = 1
    Const olCC = 2
    Const olBCC = 3
    Const olMailItem = 0
    ' Define Outlook objects
    Dim objOutlook As Object
    Dim objOutlookMsg As Object
    Dim objOutlookRecip As Object
    Dim objOutlookAttach As Object

    as a replacement for your DIM objOutLook

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    IMO is Internet Mail Only, one option in installing Outlook. The other configuration is CWG or Corporate/Workgroup.
    Charlotte

  9. #9
    Lounger
    Join Date
    May 2002
    Location
    Wytheville,VA, Virginia, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    Charlotte,
    The IMO is coming back to me now. I guess you could say that all our machines run IMO, since we only use Internet mail.

    Claus,
    I'll take another look at your code sample as time permits.

    Thanks Again

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Send message w/ different versions of Outlook (Acc97 SR2)

    That could be part of your problem. If I remember correctly, installing Outlook IMO doesn't install the CDO library.
    Charlotte

Posting Permissions

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