Forum Discussion

FrodeH's avatar
FrodeH
Copper Contributor
Dec 23, 2019

Can excel show content of document propery in a cell?

Can i get excel to do the same as word can with sharepoint metadata sync?

 

Specifically: Excel custom document properties on the info page. Can these be used in cells?

1 Reply

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    FrodeH Only using a User Defined Function in VBA. Open the VBA editor and choose Insert, Module. Paste this code:

    Function GetDocProp(DocPropertyName As String)
        GetDocProp = ActiveWorkbook.CustomDocumentProperties(DocPropertyName).Value
    End Function

    Now in any cell use the formula:

    =GetDocPropr("NameOfCustomDocumentProperty")