none
Excel VBA avoiding the TITUS pop up box in outlook RRS feed

  • Question

  • Hi All,

    I am using following code in excel 2010 to automate sending outlook email with pdf attachement.

    Sub test()
    Dim AOMSOutlook As Object
        Dim AOMailMsg As Object
        Set AOMSOutlook = CreateObject("Outlook.Application")
        Dim objUserProperty As Object
        'Const olMailItem = 0
        Dim OStrTITUS As String
        Dim lStrInternal As String
        Set AOMailMsg = AOMSOutlook.CreateItem(0)
        
        Set objUserProperty = _
            AOMailMsg.UserProperties.Add("TITUSAutomatedClassification", 1)
            
        objUserProperty.Value = "TLPropertyRoot=ABCDE;Classification=Internal;Registered to:My Companies;"
        
        With AOMailMsg
                .To = "sam.jac@bbb.com"
                .Subject = "New Report"
                .Body = "See attached PDF"
                '.Attachments.Add (AttachmentPath)
                .Save
                .Send
        End With
        
              Set AOMailMsg = Nothing
                    
              Set objUserProperty = Nothing
              Set AOMSOutlook = Nothing
              
                   
              Set lOMailMsg = Nothing
                    
              Set objUserProperty = Nothing
              Set lOMSOutlook = Nothing
              
               
    End Sub

    The code works but eveytime Titus pop up prompts to select CLASSIFICATION (Internal or General business). My code automatically selects classification as "Internal" but I want code shall automatically click "OK" on that pop up.

    Is it possible to do that using excel vba?

    Thanks,

    Zaveri





    • Edited by zaveri cc Wednesday, June 18, 2014 9:12 PM
    • Moved by George HuaModerator Thursday, June 19, 2014 8:15 AM Outlook object model related
    Wednesday, June 18, 2014 8:59 PM

Answers

  • You need to contact Titus developers instead. The issue is not related to Outlook at all.
    • Marked as answer by zaveri cc Thursday, June 19, 2014 5:42 PM
    Thursday, June 19, 2014 3:04 PM

All replies

  • Hi Zaveri,

    I ran the code in Office 2010 and Office 2013, it worked fine and I have not got any window popped up. I sent the mail to myself.

    Sub test()
        Dim AOMSOutlook As Object
        Dim AOMailMsg As Object
        Set AOMSOutlook = CreateObject("Outlook.Application")
        Dim objUserProperty As Object
        'Const olMailItem = 0
        Dim OStrTITUS As String
        Dim lStrInternal As String
        Set AOMailMsg = AOMSOutlook.CreateItem(0)
        
        Set objUserProperty = AOMailMsg.UserProperties.Add("TITUSAutomatedClassification", 1)
        objUserProperty.Value = "TLPropertyRoot=ABCDE;Classification=Internal;Registered to:My Companies;"
        With AOMailMsg
                .To = "v-fexue@microsoft.com"
                .Subject = "New Report"
                .Body = "See attached PDF"
                .Attachments.Add ("D:/1.pdf")
                .Save
                .Send
        End With
        Set AOMailMsg = Nothing
        Set objUserProperty = Nothing
        Set AOMSOutlook = Nothing
        Set lOMailMsg = Nothing
        Set objUserProperty = Nothing
        Set lOMSOutlook = Nothing
    End Sub

    Is there anything I missed?

    In addition, would you mind uploading a figure for the popped up window and telling us what the content is?


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 19, 2014 9:09 AM
    Moderator
  • Hello zaveri,

    I have never met any Titus popups in Outlook. It seems the issue is related to an Outlook add-in which displays such dialog. In that case I'd recommend contacting the add-in developers. It looks like you can reach them at titus.com.

    Thursday, June 19, 2014 10:25 AM
  • Hi George,

    Do you have Titus add  in your outlook? On my outlook ribbon, i have Titus logo(Titus message clarification for Microsoft outlook) and that may be the reason it is popping up. Below is the link to titus website

    http://www.titus.com/trials/index.php

    Below is the kind of msgbox i a getting

               

    Titus-Report name                                X
    Please select Classification level(s)
    Classification                         OK
    Internal
    General Business                      Cancel
                                                    
                                                            

    Below line of code auto selects Internal as classification

     objUserProperty.Value = "TLPropertyRoot=ABCDE;Classification=Internal;Registered to:My Companies;"

    If i can add another line of code which can auto select OK than it will be great.

    Thanks,

    Zaveri   





    • Edited by zaveri cc Thursday, June 19, 2014 1:21 PM
    Thursday, June 19, 2014 1:09 PM
  • You need to contact Titus developers instead. The issue is not related to Outlook at all.
    • Marked as answer by zaveri cc Thursday, June 19, 2014 5:42 PM
    Thursday, June 19, 2014 3:04 PM
  • Thanks
    Thursday, June 19, 2014 5:42 PM
  • I have had the problem with Titus in Excel.

    In the end the solution was very easy, Titus reacts on events, like .beforeprint.

    In Excel you need just to deactivate Events:

    Application.EnableEvents = false

    Please let me know if it works in Outlook.

    D.

    Thursday, September 18, 2014 9:30 AM
  • Zaveri,

    I know this was deemed an answer for Titus developers, but I can't help but contribute when I just got this to work for myself. It took a lot, and I mean a lot of debugging to find it the solution and for others like me struggling to get this to work in email automation with Titus installed, this should help.

    I started with this premise above and had the same issue. OK button still needed to be clicked.

    So, I went into aggressive debug mode.

    I found that the UserProperties and ItemProperties being set were far different then what you had above when I debugged a sent mailitem.

    Ultimately, adding those didn't work. So, I then decided to add the above back in and VOILA! Automation and classification selection complete. Using your example above I populated what I did.

    With AOMailMsg       

    .ItemProperties.Add("ABCDE.Registered To", olText) = "My Companies"       

    .ItemProperties.Add("ABCDE.Classification", olText) = "Internal"       

    .UserProperties.Add("ABCDE.Registered To", olText) = "My Companies"

    .UserProperties.Add("ABCDE.Classification", olText) = "Internal"       

    .UserProperties.Add("TITUSAutomatedClassification", olText) = _

    "TLPropertyRoot=ABCDE;.Registered To=My Companies;.Classification=Internal;"       

    .Send   

    End With


    My configuration is setup as such: [ROOT].[CLASS].[PROP]

    [ROOT] = ABCDE

    [CLASS] = You don't have

    [PROP] = Classification / Registered To

    I hope this helps!

    Cheers.

    Dustin

    Friday, March 18, 2016 8:25 PM
  • Hello Dustin,

    Thank you for sharing the solution for other forum users. This is exactly what Titus developers should provide to their users for avoiding any dialogs.

    Saturday, March 19, 2016 4:52 AM
  • good Day All

    How to classify Excel

    Public Sub classify()

    Dim NWB As Workbook
    Set NWB = Workbooks.Add
    Set objUserProperty = NWB.Add("TITUSAutomatedClassification", 1)
        objUserProperty.Value = "TLPropertyRoot=ABCDE;Classification=Internal;Registered to:My Companies;"
        
        
    End Sub

    THX

    Sunday, October 15, 2017 1:44 PM
  • Hi Dustin

    Though this is a quite old post; how did you find out the configuration was [ROOT].[CLASS].[PROP]? Struggling with something similar as Zaveri. And does the solution you use avoid having to click OK in order to send the message?

    Monday, September 17, 2018 12:17 PM
  • Hi Dustin,

    Where did you find Root and "My Companies"?

    I'm digging in through the locals window In Mailitem object, ItemProperties, Session, Stores, COMAddins, Item 5, Description = "Microsoft Azure Information Protection".

    Am I close to finding it?

    Thanks,
    Chris

    Thursday, March 14, 2019 2:18 AM
  • I'm still looking for this. Have you found an answer?
    Thursday, March 14, 2019 3:29 AM
  • TRY DISPLAYING THE EMAIL BEFORE YOU SEND 

                .Display 'NEED THIS TO WORK WITH TITUS
                .Send   

    Friday, July 26, 2019 10:41 PM