Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.
Sub SendOutlookInvoice() Dim ws As Worksheet, sTo As String, sAmount As String, sDueDate As String, sSubject As String Dim oOutlookApp As Object, oOutlookMail As Object Set oOutlookApp = CreateObject("Outlook.Application") oOutlookApp.Session.Logon Cells(5, ActiveCell.Column).Select Application.ScreenUpdating = False Set ws = ActiveSheet With ws sTo = ActiveCell.Offset(52, 0).Value sAmount = ActiveCell.Offset(11, 0).Value sDueDate = ActiveCell.Value sSubject = ActiveCell.Offset(-2, 0).Value sContact = ActiveCell.Offset(51, 0).Value sHosting = ActiveCell.Offset(53, 0).Value End With Set oOutlookMail = oOutlookApp.CreateItem(0) On Error Resume Next With oOutlookMail .To = sTo .CC = "" .BCC = "" .Subject = "Annual renewal of website www." & sSubject .Body = "Dear " & sContact & vbCrLf & vbCrLf & "Your website www." & sSubject & " annual " & sHosting & " is due for renewal on " & sDueDate & "." & vbCrLf & vbCrLf & "Please find attached an invoice for $" & sAmount & " for one years renewal of these services." & vbCrLf & vbCrLf & "This email is automatically generated. Please feel free to contact us should you need help. If you consider this invoice is incorrect, or you have been wrongly sent this mail, please contact us." & vbCrLf & vbCrLf & "Croxford Technology" & vbCrLf & "68b Kennels Lane" & vbCrLf & "RD2, Wanaka" & vbCrLf & "New Zealand" & vbCrLf & "Ph +64 (0)3 443 4672" & vbCrLf & "Email: email@example.com" & vbCrLf & vbCrLf & "Regards," & vbCrLf & vbCrLf & "Will Croxford" .Display End With On Error GoTo 0 Set oOutlookMail = Nothing Set oOutlookApp = Nothing Application.ScreenUpdating = True End Sub
|Auto CC in outlook for mac 2011||3||22|
|Alternative to Microsoft Outlook for emails on iPhone||5||34|
|remove lower case characters in excel formula||12||31|
|the code is not looping through||11||24|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!