none
Read the RichText content (Quick Parts) in word document RRS feed

  • Question

  • I need to read the RichText contents (Quick parts) of word document stored in a SharePoint document library and store it in a SharePoint list multiline text field without losing the RichText format from word document.

    My scenario would be to update the list whenever the word document is updated. 

     
    Monday, November 20, 2017 2:14 PM

All replies

  • Hello,

    This forum is for development issues when using Word Object Model. To read the document properties using Word Object Model, you could use Document.BuiltInDocumentProperties Property (Word)

    For example:

    Sub ListProperties()
     Dim rngDoc As Range
     Dim proDoc As DocumentProperty
     Set rngDoc = ActiveDocument.Content
     rngDoc.Collapse Direction:=wdCollapseEnd
     For Each proDoc In ActiveDocument.BuiltInDocumentProperties
     With rngDoc
     .InsertParagraphAfter
     .InsertAfter proDoc.Name & "= "
     On Error Resume Next
     .InsertAfter proDoc.Value
     End With
     Next
    End Sub

    Or 

     Dim subj As String
     subj = ActiveDocument.BuiltInDocumentProperties(wdPropertySubject)
     MsgBox "Subject is" & subj

    >>store it in a SharePoint list multiline text field without losing the RichText format from word document.

    This part of your question about SharePoint is out of scope, I suggest you post on SharePoint forum. 

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 21, 2017 2:55 AM
    Moderator