Outlook library reference file

C

Cindy

Anyone know where I can get the msoutl10.olb library
file? I have an Excel app that opens Outlook to send an
email with a file attachment. It turns out if the user
has a different version of outlook the reference file
shows up as "missing" and I have to reselect the reference
file in vba. I thought if I installed both msoutl9.olb
and msoutl10.olb on my system it would eliminate this
problem.

Anyone have another idea please let me know. Thanks


Cindy
 
C

Cindy

Manon,

Here you go. Remember, if you have different versions of
Outlook you'll have the same problem I have! Good luck

Dim OLF As Outlook.MAPIFolder, olMailItem As
Outlook.MailItem
Dim ToContact As Outlook.Recipient
Set OLF = GetObject("", _
"Outlook.Application").GetNamespace
("MAPI").GetDefaultFolder(olFolderInbox)
Set olMailItem = OLF.Items.Add ' creates a new e-mail
message
With olMailItem
.Subject = strSubject ' message subject
Set ToContact = .Recipients.Add("email
address") ' add a recipient
.Body = "type message body text here." & Chr(13) &
Chr(13)
' the message text with two line breaks
.Attachments.Add ActiveWorkbook.FullName
'adds active workbook as attachment
' .OriginatorDeliveryReportRequested = True '
delivery confirmation
' .ReadReceiptRequested = True ' read confirmation
' .Application
'.Save ' saves the message for later editing
.Send ' sends the e-mail message
'.Display 'displays Outlook so user can address
email and add body text
End With
Set ToContact = Nothing
Set olMailItem = Nothing
Set OLF = Nothing

-----Original Message-----
Hi Cindy,

Would you share your code with me. I'm stuck!
I have an Excel app that I want to open Outlook to send
an email attachment. The sender/receiver will have the
same version. I'm a beginner and don't know where to look.
 
C

Cindy

Manon,

I also found a link from the Excel Newsgroup that also
addresses what I need - late binding - and detailed code
on sending an email attachment.

http://www.dicks-clicks.com/excel/olbinding.htm
-----Original Message-----
Hi Cindy,

Would you share your code with me. I'm stuck!
I have an Excel app that I want to open Outlook to send
an email attachment. The sender/receiver will have the
same version. I'm a beginner and don't know where to look.
 
M

Michael Tissington

I'm not sure but ... if you register the tlb and or olb of the oldest
version of Outlook that you want to work with and then add a reference to
that, it should work on any machine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top