none
MS Word 2013 - Invoke of: Close - This method or property is not available because this command is not available for reading. RRS feed

  • Question

  • When i invoke the close command using java com bridge library on the read-only 2013 word document instance, i get 

    Caused by: com.jacob.com.ComFailException: Invoke of: Close

    Source: Microsoft Word
    Description: This method or property is not available because this command is not available for reading.

    Close command not available for read only word doc instance in 2013?

    Thursday, November 5, 2015 11:15 PM

All replies

  • Hi VenugopalP,

    >> Close command not available for read only word doc instance in 2013?

    It is available to close read only word doc. I am not familiar with Java, and made a test under vba. I open a word document in a read-only mode, and then close it. It worked correctly.
    Here is a simple code:

    Sub CloseReadDoc()
        Dim doc As Word.Application
        Set doc = CreateObject("Word.Application")
        doc.Visible = True
        doc.Documents.Open FileName:="D:\work\Palladium\Thread Practise\201511\20151101.docx", ReadOnly:=True
        doc.Documents("20151101.docx").Close
    End Sub

    I suggest you check how to achieve this code with java, and if you have specific issue about java, I suggest you go to Java Office site for help.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, November 6, 2015 2:26 AM