cancel
Showing results for 
Search instead for 
Did you mean: 

Excel sensitivity label

santosb
Level 2
Hello, I'm testing the Excel sensitivity label functionality, that requires to select a label before interacting with the workbook, and have not been able yet to figure out how to select a label automatically. Does anybody knows how to manage this using Excel VBO? Thanks in advance

------------------------------
Beatriz Santos
P2P Lead Europe
CHEP
Europe/Madrid
------------------------------
7 REPLIES 7

ewilson
Staff
Staff
@Beatriz Santos,

Sensitivity Labels are not currently supported in the ​VBO.

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

ManpreetKaur1
Level 8
Hi @Beatriz Santos,

Did you try code stage to achieve the functionality?​

------------------------------
Manpreet Kaur Manager
Manager
Deloitte
------------------------------

Hi All,

I have came across a requirement where I have to change the Excel file's Sensitivity label to Confidential before saving the file. Now I know the Excel VBA Code of it, however I was not able to make it workable via code stage. Can anyone help me on this? 
--------------------------------------------------------------------------------------------------------------------------------
Here is the VBA Code:

Sub SetSensitivityLabelConfidential()

  Dim myLabelInfo As Office.LabelInfo
  Dim Context As Variant
  Dim objWorkbook As Workbook
  Dim SConfidential As String

  Set objWorkbook = ActiveWorkbook
  Set myLabelInfo = objWorkbook.SensitivityLabel.CreateLabelInfo()
  Set Context = CreateObject("Scripting.Dictionary")

 
  With myLabelInfo
   .AssignmentMethod = MsoAssignmentMethod.PRIVILEGED     '1
   .ContentBits = 4
   .IsEnabled = True
   .Justification = "Write Your Reason"
   .LabelId = "Your Organization alpha numberic code for Confidential type"
   .LabelName = "Confidential"
   .SetDate = Now()
  End With

  objWorkbook.SensitivityLabel.SetLabel myLabelInfo, Context

End Sub

 --------------------------------------------------------------------------------

Thanks & Regards,
Pawan Panjwani



------------------------------
Pawan Panjwani
------------------------------

Hi Members,

Can any one help me with the above issue.

Thanks & Regards,
Pawan Panjwani



------------------------------
Pawan Panjwani
------------------------------

Did you find a solution? @PawanPanjwani1 



------------------------------
Agustin Rodolfo Catalano
Computing Engineering
Santander Argentina
America/Argentina/Buenos_Aires
------------------------------

Yes Agustin, got the solution.



------------------------------
Pawan Panjwani
------------------------------

could you tell me how you did it? @PawanPanjwani1



------------------------------
Agustin Rodolfo Catalano
Computing Engineering
Santander Argentina
America/Argentina/Buenos_Aires
------------------------------