locked
Access sharepoint version history in word RRS feed

  • Question

  • Is there a way to access the shrarepoint history table in word (or other office appliations) via a programming interface?

    Challenge:

    Generate save published versions of word documents in sharepoint to PDF.

    I use a C# application for this.

    Solution so far:

    Open a word document from the sharepoint server works.

    I cannot find a way to open the sharepont history from a word Document object.

    I have not found a way to get a list of history items.

    In word itself, I have to go to file->History to see the different versions.

    I found a versions list, but versions are not the history.


    public static void test()
            {
                Microsoft.Office.Interop.Word.Application ap = new Microsoft.Office.Interop.Word.Application();
                ap.Visible = true;
                ap.Documents.Open(@"\\dms\DavWWWRoot\sites\Project\Document1.docx");
                try
                {
                    // This question: Retrieve puslished versions
                    // TODO: ExportAsFixedFormat
                }
                finally
                {
                    ap.Documents[@"Document1.docx"].Close();
                }
            }

    I could not find it when searching the internet for a solution. 

    Many thanks in advance for any help,

    Pieter

    Tuesday, November 10, 2020 3:56 PM