Outlook - setting billing information

OK - this very basic routine sets billing information fields of all selected messages... 

If the BillInfo variable to a form that pulls the local user's project's lists and lookups up the senders project list and compares, shazam! you can start auto-tagging potential emails with project/billing information. 

_____________________________________________

Sub Set_ACTIVE_MESSAGES_BillingInformation()
    Dim objsel As Selection
    Dim i As Integer
    
    BillInfo = UCase(InputBox("", "Enter default billing INFO", "00000.000"))

    Set objsel = Outlook.ActiveExplorer.Selection
    
    On Error Resume Next
    
    For i = 1 To objsel.Count
        Set Object = objsel.Item(i)
        Select Case Object.Class
            Case olReport, olMail, olContact            ''these all behave the same way
                Object.BillingInformation = BillInfo
                Object.Save
            ''case ol other outlook items....
        End Select
   
        Set Object = Nothing
    Next i
   
End Sub

Comments

Popular posts from this blog

Powerpoint countdown and current time in slides VBA

Revit area plans adding new types and references (Gross and rentable)