> Sorry about the first post. I meant to close it, but sent it instead.
>
> Late binding is a good solution for you if your are moving the database
> around a lot. The lines in your code to look for are all the application
> references that need changing to Object, for instance:
>
> Dim objOutlook As Outlook.Application
>
> would change to:
>
> Dim objOutllook As Object
> --
> Arvin Meyer, MCP, MVP
>
http://www.datastrat.com>
http://www.mvps.org/access>
http://www.accessmvp.com>
>
> "Jason" <Jason[ at ]hotmail.com> wrote in message
> news:%23sjCrUEVJHA.1200[ at ]TK2MSFTNGP02.phx.gbl...
>> So I would put the following code in a new module and call it from my
>> startup form?
>>
>> Dim ref As Reference
>>
>> ' 0 if Late Binding
>> ' 1 if Reference to Outlook set.
>> #Const ExcelRef = 0
>> #If ExcelRef = 0 Then ' Late binding
>> Dim objXL As Object
>> Dim objWkb As Object
>> Dim objSht As Object
>> Set objXL = CreateObject("Outlook.Application")
>> ' Remove the Excel reference if it is present - <=======
>> On Error Resume Next
>> Set ref = References!Outlook
>> If Err.Number = 0 Then
>> References.Remove ref
>> ElseIf Err.Number <> 9 Then 'Subscript out of range meaning not
>> reference not found
>> MsgBox Err.Description
>> Exit Sub
>> End If
>> ' Use your own error handling label here
>> On Error GoTo tagError - <=======
>> #Else
>> ' a reference to MS Outlook <> Object Library must be specified
>> Dim objXL As Outlook.Application
>> 'Dim objWkb As Excel.Workbook
>> 'Dim objSht As Excel.Worksheet
>> Set objXL = New Oultlook.Application
>> #End If
>>
>>
>> "Tony Toews [MVP]" <ttoews[ at ]telusplanet.net> wrote in message
>> news:q684j4deh00c45eh0evj9ugnujopsg885m[ at ]4ax.com...
>>> "Jason" <Jason[ at ]hotmail.com> wrote:
>>>
>>>>can't send message for the reason ated in the previous alert.
>>>>Resolve the problem, and then send the message again.
>>>>
>>>>Microsoft Outlook 11.0 object library is ticked.
>>>>There is no previous stated alert.
>>>>I suspect this is caused by copying this database on to a computer with
>>>>Office XP/2002 and back to a computer with Office 2003.
>>>
>>> You might be best off changing to code so it doesn't matter what
>>> version of Outlook is installed.
>>>
>>> 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>>>
>>> Tony
>>> --
>>> Tony Toews, Microsoft Access MVP
>>> Please respond only in the newsgroups so that others can
>>> read the entire thread of messages.
>>> Microsoft Access Links, Hints, Tips & Accounting Systems at
>>>
http://www.granite.ab.ca/accsmstr.htm>>> Tony's Microsoft Access Blog -
http://msmvps.com/blogs/access/>>
>>
>
>