Closed Thread
Results 1 to 11 of 11

Calling up Titus Labs Message Classification from Excel

  1. #1
    Registered User
    Join Date
    04-07-2009
    Location
    Canberra, Australia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Calling up Titus Labs Message Classification from Excel

    Hello! You must get tired of hearing this, but I am very new to this. I am exploring macros in a range of Office applications to make life easier for my staff and myself.

    Every few months, we need to send out emails to a mailing list of about 4000 people. Outlook's limitations mean that we need to break this list up into about 15 different emails, and we still run into problems.

    Today, I managed to cobble together a macro that will call up Outlook from Excel and send an email from a list of addresses.

    The problem is this - my company uses Titus Labs Message Classification system. At the moment, if I run the code, someone has to sit and manually add the classification to every single email. Not very practical for 4000 emails!

    I am trying to work out a way to automatically add the required classification. I have checked in the references in the VB editor and found the reference to the library; I have looked in the program files on the system and found that it appears to be a DLL. I don't know what language it is written in.

    Does anyone have experience with this particular add in, or have any general advice that I can try?

    Thanks in advance for your tolerance and assistance.

  2. #2
    Registered User
    Join Date
    08-07-2013
    Location
    Miami, FL
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Calling up Titus Labs Message Classification from Excel

    Hello did you every find a resolve for your issue?

  3. #3
    Registered User
    Join Date
    10-04-2013
    Location
    Mexico
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Calling up Titus Labs Message Classification from Excel

    Hello Billy

    Did you get a response on your question about Titus?

    Thanks

  4. #4
    Registered User
    Join Date
    05-23-2014
    Location
    Luxembourg
    Posts
    4

    Re: Calling up Titus Labs Message Classification from Excel

    Hi All,

    I had to face the same issue since my company has installed this tools.

    I have the first half of the answer : I am able to set the Titus classification for an email that I want to be sent via VBcode from Excel :
    once the mail object created, when you assign all its properties (such as subject, recipient, body, attachment etc...), you just have to add an additional ItemProperties :
    .ItemProperties.Add("MyCompanyClassification", olText) = "CLASSIFICATION_VALUE"
    where CLASSIFICATION_VALUE is one of the classification item your are using, and MyCompanyClassification is the name of the properties used by Titus for your company (to determine it, review all the properties of a document classified by Titus from your Company).

    Here is a code example :

    Dim ol As New Outlook.Application
    Dim olmail As MailItem
    Set ol = New Outlook.Application
    Set olmail = ol.CreateItem(olMailItem)
    With olmail
    .To = "[email protected]"
    .Subject = "Titus Test"
    .Body = "This is a test for Titus Classification"
    '******************* TITUS CLASSIFICATION !!!!! ********************
    .ItemProperties.Add("MyCompanyClassification", olText) = "INTERNAL"
    .Send
    End With

    The problem is that doing this, even if it pre-selects the required classification, you will still have to manually click on the 'OK' button in the Titus pop-up that opens.
    So far, I was not able to grab control over this popup windows to force the 'OK' via VB code.
    If anyone find a solution, please tell us !

    In the Reference of the VBA code, you can add 3 Titus DLL : the files should be located in "Program Files\TITUS\MessageClassification\" :
    TL_DsoFileHooks.dll
    TL_MAPIHooks.dll
    McAfeeEPOPluginCOMDLLTMC.dll

    But I'm not sure they are very helpfull (I manage the document classification and mail classification without adding these references).

    Hoping this helps... (and hoping another guy will bring the second part of the solution !)

    Regards,

    Lo.

  5. #5
    Registered User
    Join Date
    06-03-2014
    Posts
    1

    Re: Calling up Titus Labs Message Classification from Excel

    Hello everyone,

    May seem wierd, but I think I have a small workaround to this issue.

    In a Nutshell, the issue is to classify emails and avoid the Titus lab pop up box, right?

    Apparently, Titus has not exposed any library that would allow us to do that.

    Solution:
    • 1. Use VBA to create a MailItem and send it to yourself
      2. The pop-up box will appear for you to classify the email.
      3. Do the classification manually and hit "Ok"
      4. Keep the ID of this mailItem handy
      5. Now open the same MailItem, you will see it is already classified
      6. Clear the fields first before you can put new info(To, CC, Subject, Body)
      7. Use VBA to Update the above fields again with new data
      8. send the email
      9. " No TITUS LAB POP UP WILL APPEAR" (Because this mail was classified earlier)
      10. Loop...Use the same email to send more emails if you want to.

    So, have more fun with emails Where Titus is being used!!

    Regards,
    Hasmukh
    Last edited by oshjain; 06-03-2014 at 12:06 PM.

  6. #6
    Registered User
    Join Date
    05-23-2014
    Location
    Luxembourg
    Posts
    4

    Re: Calling up Titus Labs Message Classification from Excel

    Thanks Hasmukh for this idea, this can help people having to send a lot of email, but in my case, I have to send only one email...
    But maybe in the future I will have to send more than one email from an excel file, and I will use your workaround.
    I just have one question : what is the mailItem ID ?
    In the mailItem properties, I have no item "ID" (I have ConversationIndex, EntryID, ConversationID).
    How do you get the mail back using its ID ?

    Regards,

    Lo.

  7. #7
    Registered User
    Join Date
    05-23-2014
    Location
    Luxembourg
    Posts
    4

    Re: Calling up Titus Labs Message Classification from Excel

    Hi again !

    Still thinking about Hasmukh's workaround, I tried something else :
    I created a mail message, classified it with Titus and sent it to me.
    Then, I saved this sent message as a .msg file on my computer.
    Then, I inserted it in my excel file as an embedded object.
    I tried to open it to re-use it the way you suggested, but I noticed that even if it keeps the correct classification, Titus still show the popup where I have to click on 'OK' to finalize the mail sending...
    So it seems that 'recycling' an already sent mail, we unfortunately still face the same issue again...

    Too bad...

    I think I'll give up, until another idea is raised by some genius on this forum... µ

    Regards,

    Laurent.

  8. #8
    Registered User
    Join Date
    12-16-2014
    Location
    Zwolle, The Netherlands
    MS-Off Ver
    2007
    Posts
    2

    Re: Calling up Titus Labs Message Classification from Excel

    Tituslabs can mess up the behaviour of macros. E.g. the vba command "Application.Screenupdating=False" is set automatically to "True" by the Tituslabs add-in if during running of the macro another workbook is activated. I found a workaround to avoid this and it may also be used to solve your problem with the E-mails.
    Solution 1:
    Don't use Tituslabs to insert your classification, but type it down in your E-mail by yourself and switch off Tituslabs manually. Don't worry: it will be activated the next time you start Excel. Tituslabs can be switched off as follows:
    Open Excel options and click on add-ins. Select "COM add-ins" in the pull down menue and click on the button "GO". A window with all installed COM add-ins appears: uncheck "Titus classification" and press OK. Tituslabs is now disabled.

    Solution 2:
    This is more or less the same workaround as solution 1, but this time it is automatically implemented in the code listed below. Again, type down your classification in the E-mail. To switch of Tituslabs automatically call macro "KillTitus", to reactivate Tituslabs automatically call "ActivateTitus". Be aware that this only works for Officeversions of 10 or higher and in the English language only!

    How does it work?
    First the variable CommIndex has to be filled with the COM add-in indexnumber that points at the Tituslabs add-in. This is done in the macro "GetTitus". With the macro "ToggleTitus" Tituslabs will be switched on and off. In this macro the commands "Sendkeys" and "Setcursorpos" are used so be careful that the mouse and key actions occur in the correct (=excel) window and not on your desktop or any other open window!! The macro simulates a right click on the ribbon, and presses the key "R" which provides a short cut to the COM add-ins menue by several simulated keypresses. Although the macro also works if the ribbon is minimized, there may be situations that mouseclicks occur on the wrong spot, generating undefined activity. So be careful when applying this solution and test it in different scenarios.


    VBA Code:

    Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
    Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long,

    ByVal dwExtraInfo As Long)
    Type POINTAPI
    x As Long
    y As Long
    End Type
    Public CommIndex As Integer
    Public Const MOUSEEVENTF_LEFTDOWN = &H2
    Public Const MOUSEEVENTF_LEFTUP = &H4
    Public Const MOUSEEVENTF_RIGHTDOWN As Long = &H8
    Public Const MOUSEEVENTF_RIGHTUP As Long = &H10

    Private Sub GetTitus()
    Dim lngRow As Long
    CommIndex = -1
    strSearchString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz!@#$%&*(_+"
    If Application.COMAddIns.Count = 0 Then Exit Sub
    lngRow = 1
    For Each objCOMAddin In Application.COMAddIns
    ComName = objCOMAddin.Description
    If InStr(1, strSearchString, Left(ComName, 1)) > 0 Then
    If Left(ComName, 5) = "TITUS" Then
    If objCOMAddin.Connect Then CommIndex = lngRow
    End If
    lngRow = lngRow + 1
    End If
    Next objCOMAddin
    End Sub


    Sub ToggleTitus()
    Dim typWhere As POINTAPI
    Dim lngStatus, Xval As Long
    Dim RibbonSmall As Boolean
    trij = ActiveCell.Row
    tkol = ActiveCell.Column
    RibbonSmall = False
    SendKeys "^{HOME}", True
    DoEvents
    Cells(trij, tkol).Select
    DoEvents
    If Application.CommandBars("Ribbon").Height < 100 Then
    SendKeys "^{F1}", True
    RibbonSmall = True
    DoEvents
    End If
    lngStatus = GetCursorPos(typWhere)
    Xval = ActiveWindow.PointsToScreenPixelsX(0)
    jval = ActiveWindow.PointsToScreenPixelsY(0)
    Application.ExecuteExcel4Macro "Show.Toolbar(""Ribbon"",true)"
    yval = ActiveWindow.PointsToScreenPixelsY(0)
    SetCursorPos Xval + 50, yval - 100
    jval = yval - jval
    mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
    mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
    SendKeys "R", True
    SendKeys "{DOWN}", True
    SendKeys "{DOWN}", True
    SendKeys "{TAB}", True
    SendKeys "{TAB}", True
    SendKeys "{TAB}", True
    SendKeys "{DOWN}", True
    SendKeys "{DOWN}", True
    SendKeys "{ENTER}", True
    SendKeys "G", True
    For i = 2 To CommIndex
    SendKeys "{DOWN}", True
    Next i
    SendKeys " ", True
    SendKeys "{ENTER}", True
    If jval > 0 Then Application.ExecuteExcel4Macro "Show.Toolbar(""Ribbon"",false)"
    If RibbonSmall Then SendKeys "^{F1}", True
    SetCursorPos typWhere.x, typWhere.y
    End Sub


    Sub KillTitus()
    If Val(Application.Version) < 14 Then Exit Sub
    Call GetTitus
    If CommIndex > -1 Then ToggleTitus
    End Sub

    Sub ActivateTitus()
    If Val(Application.Version) < 14 Then Exit Sub
    If CommIndex > -1 Then ToggleTitus
    End Sub
    Last edited by Hahendri; 12-16-2014 at 12:09 PM.

  9. #9
    Registered User
    Join Date
    05-23-2014
    Location
    Luxembourg
    Posts
    4

    Re: Calling up Titus Labs Message Classification from Excel

    Hi Hahendri,

    Thanks for the work, but unfortunately, disabling the TitusLabClassification is strictly forbidden by my company policies...

  10. #10
    Registered User
    Join Date
    12-16-2014
    Location
    Zwolle, The Netherlands
    MS-Off Ver
    2007
    Posts
    2

    Re: Calling up Titus Labs Message Classification from Excel

    Hi Lo.

    That's too bad, maybe you can discuss it with your employer: your mails will still be provided with the correct classification, not by Tituslabs but by your typing.

  11. #11
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: Calling up Titus Labs Message Classification from Excel

    @Lo.,
    @Hahendri,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    -----------------------------
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1