I want to add some CustomDocumentProperties to an Excel Spreadsheet. The connector exposes the CustomDocumentProperties as an object, but it is unclear how to Add or Remove a specific property.
In Microsoft's documentation, it says you do this using a Method _Workbook.CustomDocumentProperties.Add(...). It says this Method is in Office.dll.
Well, Pega Robotics substitutes its own version of Office.dll. Using Object Browser, I can see that Add method in Microsoft's version and I can't see it in the Pega Robotics version. If I include the Add method in a script, it says I am missing a reference, which is what I would expect. It is also missing msoPropertyTypes..
Is there a reasonable way to get around this?
***Updated by moderator: Lochan to add SR details***
Attached an image of how I set it up. Likewise, you can just do the full "Add" operation in the Script component method but for this quick mock-up, I just passed in the CustomDocumentProperties Object to the Script and return it as a casted Microsoft.Office.Core.DocumentProperties Object.
Required COM reference Microsoft Office xx.0 Object Library.
Edit: also noting that I included a - using Microsoft.Office.Core;