
Untitled
By: a guest on
Apr 28th, 2012 | syntax:
None | size: 0.73 KB | hits: 12 | expires: Never
Outlook 2007 VBA - apply action only when in specific Outlook account
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If MsgBox("Send with 'Myrtleford Festival" at start of subject?", vbYesNo, "Send as Festival mail") = vbYes Then
If (Left(Trim(Item.Subject), 11)) <> "The " Then
Item.Subject = "The Myrtleford Festival 2012/ " + Item.Subject
End If
End If
Personal Folders
Archive Folders
Test Folders
Sub AnswerA()
Dim InxIFLCrnt As Integer
Dim TopLvlFolderList As Folders
Set TopLvlFolderList = _
CreateObject("Outlook.Application").GetNamespace("MAPI").Folders
For InxIFLCrnt = 1 To TopLvlFolderList.Count
Debug.Print TopLvlFolderList(InxIFLCrnt).Name
Next
End Sub