Category: programming

Developing an outlook helper–part 2 from 5–VBA

Series

 

Developing Outlook helper – introduction

Developing Outlook helper-VBA macro

Developing Outlook helper-C#

Developing Outlook helper – javascript for Office 365

Developing Outlook helper – conclusions

Develop like it was ‘9x:

In the early days to develop an outlook addon it was simple : Press ALT+F11 and wrote the VBA. ( in our days , you go to the outlook settings and enable macros)

The code will be something like this:

Public Sub IsUserInEmail()
    Dim current
    Set current = Application.ActiveInspector.CurrentItem
    
    If Not TypeOf current Is MailItem Then Exit Sub
    Dim m As MailItem
    Set m = current
    
    Dim name As String
    name = InputBox("Please give me the user name", "Find User")
    If (Len(name) = 0) Then Exit Sub
    
    
    If (InStr(1, m.To, name, vbTextCompare) > 0) Then
        MsgBox "The name " & name & " has received the email"
        Exit Sub
    End If
    If (InStr(1, m.Sender.name, name, vbTextCompare) > 0) Then
        MsgBox "The name " & name & " has received the email"
        Exit Sub
    End If
    Dim rec As Recipient
    For Each rec In m.Recipients
        If (InStr(1, rec.name, name, vbTextCompare) > 0) Then
            MsgBox "The name " & name & " has received the email"
            Exit Sub
        End If
    Next rec
    MsgBox "The name " & name & " has NOT received the email"
    
End Sub

Test like it was ‘9x:

If you want to test, open the email ( double click the email) . Then run with F5 and debug.

Deploy like it was ‘9x:

Send to the user the VBA script and tell him step by step how to copy / paste

Developing an outlook helper–part 1 from 5

Series

 

Developing Outlook helper – introduction

Developing Outlook helper-VBA macro

Developing Outlook helper-C#

Developing Outlook helper – javscript for Office 365

Developing Outlook helper – conclusions

I want to show how much the software have changed from the early days to now.

For this , I will show it was / is to develop / test / deploy a sample outlook macro/application that allows the user to find if a name is between the email addresses from an email ( in a international company this is rather a difficult task).

The part 2 will be implementation as  an Outlook VBA Macro

The part 3 will be a VS addon application

The part 4 will be a modern Javascript Office 365 application

In the part 5 I will put the conclusions – but I think that you have an idea about what I am talking.

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.