none
How can I insert a watermark and how can I remove it afterwards with using "JavaScript API for Office" RRS feed

  • Question

  • Hallo toegether

    I'm new with office app using the "JavaScript API for Office".
    I d'like to insert a watermark in the actual document. Some time later I will remove it again. How can I do that? How can I iterate over all the headers and footers to find all watermarks?

    Thanks for your help.


    Roman St.

    Tuesday, November 19, 2013 2:50 PM

Answers

  • Hi,

    >>Some time later I will remove it again. How can I do that? How can I iterate over all the headers and footers to find all watermarks? <<

    I’m afraid you cannot do that.

    Apps for Office specializes in interaction with the web but not interaction with the Office client object models. There is no JavaScript API provided to get the header or footer object of the document.

    To interact with the Office client object models, you could choose to use the VBA macro or Visual Studio for Office.

    Here is an article introducing the comparison of Apps for Office, VSTO, and VBA, it may help you to choose of tools for specific function: Roadmap for Apps for Office, VSTO, and VBA


    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 22, 2013 3:17 AM
    Moderator
  • Hi,

    Do you mean the “ooml” as Open XML? What’s the meaning of “insert as ooml package”?

    As far as I know, we could insert or delete a custom XML part that is bound to a content control within a Word document by Apps for Office.

    Here is a sample for your reference: Apps for Office: Work with custom XML parts

    But to manipulate and delete a shape or watermark into the header or footer during manipulation of the ooml, I don’t think we could do that. During manipulating with the XML part, we cannot access to the header and footer object. They are client Object.

    To interact with the Office client object models, you could choose to use the VBA macro or Visual Studio for Office.

    If you have any feedbacks or suggestions about Apps for Office Development, please feel free to submit your feedback to User Voice.


    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.



    Monday, November 25, 2013 5:53 AM
    Moderator

All replies

  • Hi,

    >>Some time later I will remove it again. How can I do that? How can I iterate over all the headers and footers to find all watermarks? <<

    I’m afraid you cannot do that.

    Apps for Office specializes in interaction with the web but not interaction with the Office client object models. There is no JavaScript API provided to get the header or footer object of the document.

    To interact with the Office client object models, you could choose to use the VBA macro or Visual Studio for Office.

    Here is an article introducing the comparison of Apps for Office, VSTO, and VBA, it may help you to choose of tools for specific function: Roadmap for Apps for Office, VSTO, and VBA


    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 22, 2013 3:17 AM
    Moderator
  • Hi

    Thanks for your answer. Is it possible to insert (as ooml package), manipulate and delete a shape or watermark into the header or footer during manipulation of the ooml? If yes, how?

    Thanks for your help

    Roman


    Roman St.

    Friday, November 22, 2013 6:15 AM
  • Hi,

    Do you mean the “ooml” as Open XML? What’s the meaning of “insert as ooml package”?

    As far as I know, we could insert or delete a custom XML part that is bound to a content control within a Word document by Apps for Office.

    Here is a sample for your reference: Apps for Office: Work with custom XML parts

    But to manipulate and delete a shape or watermark into the header or footer during manipulation of the ooml, I don’t think we could do that. During manipulating with the XML part, we cannot access to the header and footer object. They are client Object.

    To interact with the Office client object models, you could choose to use the VBA macro or Visual Studio for Office.

    If you have any feedbacks or suggestions about Apps for Office Development, please feel free to submit your feedback to User Voice.


    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.



    Monday, November 25, 2013 5:53 AM
    Moderator