Re: Redemption, Help with selecting E-mail Account
- From: "Ken Slovak - [MVP - Outlook]" <kenslovak@xxxxxxxx>
- Date: Sun, 27 Jan 2008 16:32:27 -0500
Run regsvr32 on Redemption.dll, then try your code.
I'd use something like this:
' previous code
Dim oNS As Outlook.NameSpace
Set OutApp = CreateObject("Outlook.Application")
Set oNS = OutApp.GetNameSpace("MAPI")
oNS.Logon
Set OutMail = OutApp.CreateItem(0)
For Each cell In ThisWorkbook.Sheets("Mail") _
.Columns("BA").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" Then
strto = strto & cell.Value & ";"
End If
Next
strto = Left(strto, Len(strto) - 1)
With Destwb
.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum
On Error Resume Next
Set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = oNS.MAPIOBJECT
Set Account = Session.Accounts("123 Reporting")
.Account = Account
With OutMail
.To = ""
.CC = ""
.BCC = strto
.Subject = ThisWorkbook.Sheets("Mail").Range("A1").Value
.Body = ""
.Attachments.Add Destwb.FullName
.ReadReceiptRequested = True
.Importance = 1
.DeferredDeliveryTime =
ThisWorkbook.Sheets("Mail").Range("B1").Value
.Save
Dim sID As String
sID = .EntryID
End With
Set Msg = Session.GetItemFromID(sID)
Msg.Account = Account
.Subject = .Subject
.Save
.Send
End With
'rest of the code
.
- Follow-Ups:
- References:
- Redemption, Help with selecting E-mail Account
- From: Sean
- Re: Redemption, Help with selecting E-mail Account
- From: Ken Slovak - [MVP - Outlook]
- Re: Redemption, Help with selecting E-mail Account
- From: Sean
- Redemption, Help with selecting E-mail Account
- Prev by Date: Re: Searching for Outlook 2007 VBA Consulting
- Next by Date: Re: Items not moing from Outbox to Sent
- Previous by thread: Re: Redemption, Help with selecting E-mail Account
- Next by thread: Re: Redemption, Help with selecting E-mail Account
- Index(es):