Sharepoint-Word ContentTypeProperties

34 Views Asked by At

I like using the Document Sets in Sharepoint (online 365 version). A document placed in a document set picks up the columns on the document set as metadata, which helps with form production. I have been able to access this metadata in VBA (to assemble text blocks, etc...) using the first line bwlow.

This is just not working now, and I can't figure out why. I am getting an error: "Method 'value' of object 'Metaproperty' failed".

I am trying to just debug.print it, and this generally works in other (older) documents.

I have also tried the second set of code, which also works in older documents, but now throws an error: element not found

Anyone have any ideas for me? Am I possibly missing a reference library in VBA?

  1. ActiveDocument.ContentTypeProperties("column name").Value

or

  1. Dim sp As MetaProperties Set sp = ActiveDocument.ContentTypeProperties Debug.Print sp("column name")
0

There are 0 best solutions below