View Single Post
 
Old 01-03-2019, 02:31 AM
Browny38 Browny38 is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 3
Browny38 is on a distinguished road
Default Unsubscribe code for newsletter

Hi I am starting up a monthly newsletter and want to add a unsubscribe button in Vba
I can get the button in position but need the code. Help appreciated.
I have written this but it needs editing.
Sub UnsubEmail ()
Dim c1App As Outlook.Application
Dim c1Mail As Outlook.MailItem
Set c1App = CreateObject(“Outlook.Application”)
Set c1Mail = c1App.CreateItem(c1MailItem)
c1Mail.To = My Email
c1mail.Subject = “Unsubscribe”
c1Mail.Body = “Unsubscribe this person”
c1Mail.Send
‘Clean Up
Set c1App = Nothing
Set c1Mail = Nothing
End Sub

Last edited by Browny38; 01-03-2019 at 05:19 PM.
Reply With Quote