Setting Outlook Themes

Southernwave

New Member
Joined
Jun 6, 2008
Messages
8
Can I set the OUTLOOK themes from my Excel macro ?

I have the following macro that sends emails .. I would like to automatically set the background template in OUTLOOK


Code:
Sub SendEMail()
    Dim Email As String, Subj As String
    Dim Msg As String, URL As String
    Dim r As Integer, x As Double
    Range("DataRow").Value = ActiveCell.Row
'       Get the email address
        Email = Cells(ActiveCell.Row, 17)
        
'       Message subject
        Subj = "Your Requested Piece of Music"
'      Compose the message
        Msg = ""
        Msg = Msg & "Dear " & Cells(ActiveCell.Row, 11) & "," & vbCrLf & vbCrLf
        Msg = Msg & "Thank you very much for your request ." & vbCrLf & vbCrLf & "I am pleased to inform you that your requested piece of music .... "
        Msg = Msg & Cells(ActiveCell.Row, 3) & "  by  " & Cells(ActiveCell.Row, 2) & ".... will be broadcast on  " & Cells(ActiveCell.Row, 9).Text & " ." & vbCrLf & vbCrLf & "I hope you enjoy it." & vbCrLf & vbCrLf
        Msg = Msg & "MA" & vbCrLf
        Msg = Msg & "US"
'       Replace spaces with %20 (hex)
        Subj = Application.WorksheetFunction.Substitute(Subj, " ", "%20")
        Msg = Application.WorksheetFunction.Substitute(Msg, " ", "%20")
                
'       Replace carriage returns with %0D%0A (hex)
        Msg = Application.WorksheetFunction.Substitute(Msg, vbCrLf, "%0D%0A")
'       Create the URL
        URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg
        
'       Execute the URL (start the email client)
        ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus
'
End Sub

I have looked and read but can work out if I can or not .. or how

Thanks in advance
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,191,123
Messages
5,984,774
Members
439,910
Latest member
Flyingjoblo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top