License information for this component not found..

  • Thread starter Thread starter Song
  • Start date Start date
S

Song

Vista, A2007

Following sub used to work in .accde but not now. Now it only works in
..accdb I searched and it says something about VB 5 or 6 which I don't have.
The error message is in the this subject. Can anyone help? Thanks.

Private Sub cmdOutlook_Click()
If Me.Dirty Then
Me.Dirty = False
End If
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim ctlBody As String

Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)
ctlBody = "Dear " & IIf([Sex] = "M", "Mr. ", "Ms. ") & StrConv([FirstName],
3) & " " & IIf(IsNull([M]), "", [M] & ". ") & StrConv([LastName], 3) & ","
With objMail
..To = Me.Email
..BodyFormat = olFormatHTML
..HTMLBody = "<HTML><BODY>" & ctlBody & "</p></BODY></HTML>"
..Display
End With

Set objMail = Nothing
Set olApp = Nothing
End Sub
 
Hi Song,

My guess is a missing reference in the .accde file. Here are two excellent
articles on the subject of missing references:

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

Have you considered converting your early bound Outlook code to use late
binding? Late binding means that you do not need to include a checked
reference to the Outlook Object Library. So, you eliminate the possibility of
a missing reference error right there. You'd still need to have Outlook
installed, with all it's files properly registered, but you wouldn't need to
include a checked reference to a version specific object library.

I give an example of using late bound Outlook code in a Word document that I
call "Access Links". You are welcome to download a copy from here:

http://www.accessmvp.com/TWickerath/

Search the document for the word Outlook. You should be able to find it
fairly easily. Also, I recommend getting this download from Microsoft:

The Office XP Automation Help file is available for download
http://support.microsoft.com/?kbid=302460

Although written for XP, it will still provide lots of good information for
working with Office 2003 or Office 2007. It includes sections on using early
vs. late binding.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Problem solved by get new version of AUTO FE
http://www.granite.ab.ca/access/autofe.htm

Thanks.

Tom Wickerath said:
Hi Song,

My guess is a missing reference in the .accde file. Here are two excellent
articles on the subject of missing references:

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

Have you considered converting your early bound Outlook code to use late
binding? Late binding means that you do not need to include a checked
reference to the Outlook Object Library. So, you eliminate the possibility
of
a missing reference error right there. You'd still need to have Outlook
installed, with all it's files properly registered, but you wouldn't need
to
include a checked reference to a version specific object library.

I give an example of using late bound Outlook code in a Word document that
I
call "Access Links". You are welcome to download a copy from here:

http://www.accessmvp.com/TWickerath/

Search the document for the word Outlook. You should be able to find it
fairly easily. Also, I recommend getting this download from Microsoft:

The Office XP Automation Help file is available for download
http://support.microsoft.com/?kbid=302460

Although written for XP, it will still provide lots of good information
for
working with Office 2003 or Office 2007. It includes sections on using
early
vs. late binding.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Song said:
Vista, A2007

Following sub used to work in .accde but not now. Now it only works in
..accdb I searched and it says something about VB 5 or 6 which I don't
have.
The error message is in the this subject. Can anyone help? Thanks.

Private Sub cmdOutlook_Click()
If Me.Dirty Then
Me.Dirty = False
End If
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim ctlBody As String

Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)
ctlBody = "Dear " & IIf([Sex] = "M", "Mr. ", "Ms. ") &
StrConv([FirstName],
3) & " " & IIf(IsNull([M]), "", [M] & ". ") & StrConv([LastName], 3) &
","
With objMail
..To = Me.Email
..BodyFormat = olFormatHTML
..HTMLBody = "<HTML><BODY>" & ctlBody & "</p></BODY></HTML>"
..Display
End With

Set objMail = Nothing
Set olApp = Nothing
End Sub
 
Back
Top