locked
Access 2010 Runtime Packager RRS feed

  • Question

  • I need to deploy an Access app in a mixed environment of XP and Windows7 machines. The app was originally written in A2002 and I've been modifying it in A2010. I've encountered a problem with the Package Solution Wizard disappearing and have read the threads on that subject from a year ago. At this point I'm not sure if it's worth it to package it in 2010 or go back to A2007 and package it there. Will an A2007 runtime run in Windows7? Will an A2010 runtime run in XP? Does it matter which way I go?

    I'd welcome any comments on which path I should take.


    Darrell H Burns
    Friday, August 19, 2011 7:33 PM

Answers

  • Thanx, Tony, that was helpful. Now I'm having trouble figuring out how to pass the arguments to the Outlook object. I used CreateItem when I was early-binding, but now it doesn't like the olMailItem parameter.
    This is my code...
    Dim objOutlook As Object
    
    Dim objMailItem As Object
    
    Set objOutlook = CreateObject("Outlook.Application")
    
    Set objMailItem = objOutlook.CreateItem(olMailItem) <==variable not defined 
    objMailItem.To = strRecipient objMailItem.Subject = strSubject objMailItem.Body = strBody objMailItem.Send

    Darrell H Burns


    With late binding you can't use object constants like that.  You either have to define them or you have to pass the actual value.  So you could use

     

    Const olMailItem As Long = 0

    or just use

    Set objMailItem = objOutlook.CreateItem(0)


    Bob Larson, Access MVP 2008-2010, 2011
    Monday, August 22, 2011 1:45 AM

All replies

  • Darrell

    All versions of 32-bit Access will run in Windows XP. If you are modifying you app in 2010, I strongly suggest you convert it to 2010 if you haven't already done so. Modifying an MDB in 2010 can lead to a lot of broken stuff. If your users' lowest version is 2002, you should be developing in that version to stay on the safe side.

    There is a module that Allen Browne wrote for prepping an access db to run in 2010. It works really well. You can download it at http://www.allenbrowne.com/ser-69.html and adjust the constants to suit.


    Bill Mosca
    http://www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals
    Friday, August 19, 2011 7:59 PM
  • Hi Bill.

    Yes, I've converted the database to A2010 already. I want to deploy it as a runtime, which is why I asked the questions:

    • Will an A2007 runtime run in Windows7?
    • Will an A2010 runtime run in XP?

    The app makes calls to the Outlook2010 object...if I include the MSOUTL.OLB version 14 in the msi will it run in the older environments?

    Thanx,

    Darrell


    Darrell H Burns
    Friday, August 19, 2011 8:13 PM
  • Darrell:

    The Access Runtime you should use REGARDLESS of Operating system is the 2010 Runtime, if you have been developing with Access 2010.  It will work with Windows XP SP3 (must have SP3 though).

    Also, you should probably be using LATE BINDING for anything to have to do with Outlook since then it can be used with any version that is installed (as long as you aren't using any features that don't exist in the earlier versions).  But it isn't going to be legal to distribute the MSOUT.OLB file as it is part of the Office installation files and would need to be installed under a correct license and installation of Office.


    Bob Larson, Access MVP 2008-2010, 2011
    • Edited by accessbob-pdx Friday, August 19, 2011 9:30 PM add extra clarification
    Friday, August 19, 2011 9:29 PM
  • Bob,

    I'm not familiar with LATE BINDING...can you elaborate plz?

    When I create the A2010 package do I add the MSOUTL.OLB as follows?

    BTW, This is for a client who already has licenses for Office 2010 and I'll be distributing the file internally.

    Thanx!

    Darrell

     


    Darrell H Burns
    Friday, August 19, 2011 10:48 PM
  • Bob,

    I'm not familiar with LATE BINDING...can you elaborate plz?

    When I create the A2010 package do I add the MSOUTL.OLB as follows?

    BTW, This is for a client who already has licenses for Office 2010 and I'll be distributing the file internally.

    Thanx!

    Darrell

     


    Darrell H Burns


    Instead of setting a reference to Outlook in the references you declare your objects like:

     

    Dim objOL As Object   instead of   Dim objOL As Outlook.Application

    And all other Outlook objects too:

    Dim olMail As Object

    So then you use

    Set objOL = CreateObject("Outlook.Application")

    instead of Set objOL = New Outlook Application

     

    Also, again, you would NOT distribute the OLB for Outlook.  They need to have Outlook installed on their machine.


    Bob Larson, Access MVP 2008-2010, 2011
    Friday, August 19, 2011 11:00 PM
  • DarrellDoesData wrote:

    I'm not familiar with LATE BINDING...can you elaborate plz?

    Late binding means you can safely remove the reference and only have an
    error when the app executes lines of code in question.  Rather than
    erroring out while starting up the app and not allowing the users in the
    app at all.  Or when hitting a mid, left or trim function call. 
    This also is very useful when you don't know  version of the external
    application will reside on the target system.  Or if your organization
    is in the middle of moving from one version to another.

    For more information including additional text and some detailed links
    see the "Late Binding in Microsoft Access" page at
    http://www.granite.ab.ca/access/latebinding.htm

    When I create the A2010 package do I add the MSOUTL.OLB as follows?
    <http://social.microsoft.com/Forums/getfile/4194/>

    No.

    Tony


    Tony Toews, Microsoft Access MVP
    Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
    Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
    For a convenient utility to keep your users FEs and other files   updated see http://www.autofeupdater.com/

    Sunday, August 21, 2011 7:21 PM
  • Hi Bob. I followed what you suggested and the eMail worked fine when executed in native A2010. But it doesn't work when I package it with the A2010 packager and execute with the runtime. I tested the runtime on the same machine I created it: Windows7, Office2010 32-bit.

    Public Function SendMail() As Integer
      Dim OutlookObject As Object
      Dim OutlookMailItem As Object
      On Error GoTo SendMail_Error
      SendMail = False
      'Create a new email object...
      Set OutlookObject = CreateObject("Outlook.Application")
      Set OutlookMailItem = OutlookObject.CreateItem(Outlook.OlItemType.OutlookMailItem)
      'Add the To/Subject/Body to the message...
      OutlookMailItem.To = strRecipient
      If strCcRecipient > "" Then
        OutlookMailItem.CC = strCcRecipient
      End If
      OutlookMailItem.Subject = strSubject
      OutlookMailItem.Body = strBody
      OutlookMailItem.Send  ' send without previewing
    SendMail_exit:
    
    


    Darrell H Burns
    Sunday, August 21, 2011 7:33 PM
  • Thanx, Tony, that was helpful. Now I'm having trouble figuring out how to pass the arguments to the Outlook object. I used CreateItem when I was early-binding, but now it doesn't like the olMailItem parameter.
    This is my code...
    Dim objOutlook As Object
    Dim objMailItem As Object
    Set objOutlook = CreateObject("Outlook.Application")
    Set objMailItem = objOutlook.CreateItem(olMailItem)  <==variable not defined 
    objMailItem.To = strRecipient objMailItem.Subject = strSubject objMailItem.Body = strBody objMailItem.Send

    Darrell H Burns
    Sunday, August 21, 2011 10:37 PM
  • Thanx, Tony, that was helpful. Now I'm having trouble figuring out how to pass the arguments to the Outlook object. I used CreateItem when I was early-binding, but now it doesn't like the olMailItem parameter.
    This is my code...
    Dim objOutlook As Object
    
    Dim objMailItem As Object
    
    Set objOutlook = CreateObject("Outlook.Application")
    
    Set objMailItem = objOutlook.CreateItem(olMailItem) <==variable not defined 
    objMailItem.To = strRecipient objMailItem.Subject = strSubject objMailItem.Body = strBody objMailItem.Send

    Darrell H Burns


    With late binding you can't use object constants like that.  You either have to define them or you have to pass the actual value.  So you could use

     

    Const olMailItem As Long = 0

    or just use

    Set objMailItem = objOutlook.CreateItem(0)


    Bob Larson, Access MVP 2008-2010, 2011
    Monday, August 22, 2011 1:45 AM
  • Hi,

    I was having same scenario. The DB was built in 2007 & it was working fine with runtime 2007. Later I got upgrade office 2010. I started to edit the app in Access 2010. But then i found that on client machines with having xp & office 2003 i was having issue of MSOUTL.OLB. I was having same code which Darrel has used. I juts removed the reference to Office Object Library 14 & the app started to work as normal.

    Monday, September 30, 2013 10:05 AM