I created a macro project, just curious if there is a way to create an add-in that a user can double click and have it install on their outlook?
I created a macro project, just curious if there is a way to create an add-in that a user can double click and have it install on their outlook?
I actually opened up Visual Studio and opened a project for office outlook add-in.
Is there an easy way to convert this macro to vb?
and assign it a button?Option Explicit Sub prefixSubjectWithEncrypt() Dim myItem As MailItem Set myItem = ActiveInspector.CurrentItem myItem.Display If myItem.To = "" Then MsgBox "You need at least one recipient" Exit Sub End If myItem.Subject = "[encrypt]" & myItem.Subject myItem.Send End Sub
Each of the email fields can be hard coded or reference a cell value:
Then, to check for any empty fields:With OutMail .To = Sheets("Sheet1").Range("A1").Value_________ 'or it could be hardcoded like .To = "an_email@anywhere.com" .Subject = "Testfile"____________________________ 'or Sheets("Sheet1").Range("B1").Value .Body = "Hi "__________________________________' or Sheets("Sheet1").Range("C1").Value .Send 'Or use .Display End With
If .To = "" Then MsgBox "You need at least one recipient in the TO field" Exit Sub End If If .Subject = "" Then etc., etc.,
The above is the basics ... here is an example email project (attached):WORKS Mail It.xlsm