How to Work With a Document in the Word JavaScript API

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • We've seen how to manipulate objects across the Excel JavaScript API, but we can also use the Office API in other Office Applications. In this tutorial, we will explore how to use the Word API to manipulate a Word Document.
    Video Resources:
    --------------------------------------------------
    Resource: GitHub File
    Link: github.com/areed1192/sigma_co...
    Resources:
    --------------------------------------------------
    Facebook Page: / codingsigma
    Facebook Group: / sigmacoding
    GitHub Sigma Coding: github.com/areed1192/sigma_co...
    Support Sigma Coding:
    --------------------------------------------------
    Patreon: / sigmacoding
    Amazon Associates: amzn.to/3bsTI5P **
    Related Topics:
    --------------------------------------------------
    Title: How to Work With a Document in the Word JavaScript API
    Link: • How to Work With a Doc...
    Title: Working With Lists in the Word JavaScript API
    Link: • Working With Lists in ...
    Title: Working with Tables in the Word JavaScript API
    Link: • Working with Tables in...
    **Amazon Associates Disclosure:
    --------------------------------------------------
    I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. One of the ways I support the channel is by using Amazon Associates to earn fees on purchases you make. That means when you use the link above, it will track any purchases made from that link and give a small portion of it to the Sigma Coding. I love this approach because it allows you to do what you're already doing (shopping) but also helps support the channels you care about. Also, it makes it where I can invest that revenue to help improve and grow the channel.
    Tags:
    --------------------------------------------------
    #Word #JavaScriptAPI #Documents

Komentáře • 28

  • @secretagentx-9908
    @secretagentx-9908 Před 4 lety +4

    So you can only edit word documents with javascript from within word? I can't, for example, create a word file in node and add text and images to it, straight from a node server?

  • @vijaysingh-ck1gc
    @vijaysingh-ck1gc Před 3 lety

    thanks for showing the demo, can we access native add-ins from custom add-in, for eg. if I want to get a text from document and display under my custom-add in, then If I click on the text, it should open native add-in (navigation search at the left) and put a clicked text under search textfield of native add in, please suggest on this, thank you

  • @MrMolverat
    @MrMolverat Před 3 lety

    Hello I have tried using a text input on the html and use the value inside the script using
    let inputData = document.getElementById("inputId").nodeValue; *.innertText , etc, an nothing is able to get the info written.
    Could you help?

  • @samyukthakota3853
    @samyukthakota3853 Před 3 lety

    How to get the strikeThrough Property value from the whole document present in font class object.It might be "n" number of pages in the document.

  • @emant6896
    @emant6896 Před 4 lety

    Thanks a lot.

  • @abhijitkhillari9334
    @abhijitkhillari9334 Před 4 lety

    Hi Can we add bullets using office js in word

  • @flutterflowexpert
    @flutterflowexpert Před 2 lety +1

    Is it possible to find and replace word using this API? It will be be great if you can show us a demo.

  • @alanl.ambron1749
    @alanl.ambron1749 Před 3 lety

    Hi, thanks for the video. I currently have a paragraph as a range. I'm am trying modify a specific character in that paragraph at a specific location.

    • @SigmaCoding
      @SigmaCoding  Před 3 lety

      Have you investigated the search option?
      docs.microsoft.com/en-us/office/dev/add-ins/word/search-option-guidance
      Might be a good place to start.

  • @dangkhanhlinh476
    @dangkhanhlinh476 Před 4 lety

    Hi
    Can I use scriptlap in excel and word at the same time ?, I need to read data on excel and switch to word!

    • @SigmaCoding
      @SigmaCoding  Před 4 lety

      You should be able to, you would just be loading the add-in separately in each application.

  • @MrHectorsm
    @MrHectorsm Před 3 lety +2

    Can JavaScript be made interactive (user forms with controls) and connect to databases (Oracle) to retrieve information?

    • @SigmaCoding
      @SigmaCoding  Před 3 lety +3

      Well, you can add controls now doing the whole "populating using a database" is a different story. However, I'm planning to do a content control video for the Word API. I'll try to see if I can add something like that in there.

    • @georgerady9706
      @georgerady9706 Před 9 měsíci

      Wouldn’t Microsoft steer you towards using Azure or SQL Server?

  • @duxingsky
    @duxingsky Před 4 lety +1

    What the editor in the video ?

    • @SigmaCoding
      @SigmaCoding  Před 4 lety

      It's Script Lab, an Office Add-in that is used for exploring the Office API. You can learn more about it here.
      *www.microsoft.com/en-us/garage/profiles/script-lab/*

  • @TravelFunRepeat
    @TravelFunRepeat Před 4 lety

    Can we read the entire text in one go? My objective is to read text residing inside document not search. Please guide

    • @SigmaCoding
      @SigmaCoding  Před 4 lety +1

      Here is a link with an example: docs.microsoft.com/en-us/javascript/api/word/word.body?view=word-js-preview#text

    • @TravelFunRepeat
      @TravelFunRepeat Před 4 lety +1

      @@SigmaCoding This really helped ..!! Thanks a lot

  • @jamesmorrison2198
    @jamesmorrison2198 Před 3 lety

    How do you enable JavaScript in MS Word? I saved a document & when I tried to open it it said "You need to enable JavaScript to run this app.". So, How do I enable it?

  • @Awaisali-mz2bh
    @Awaisali-mz2bh Před rokem

    Is it possible to convert a word doc to pdf using this library?,

  • @jaypaltagline4455
    @jaypaltagline4455 Před rokem

    how to get multiple pages index number of content

  • @itsjustpaperman
    @itsjustpaperman Před rokem

    why do we need to load those properties ?

  • @georgerady9706
    @georgerady9706 Před 9 měsíci

    Perhaps there’s an answer somewhere else, but I am on a corporate - locked down - Surface build where Office365 is limited to using; Word, Excel, PowerPoint, Outlook… and I tried get a Power Automate procedure setup and got blocked by “Flow Checker” requiring a Premium License…
    I’m pursuing that…
    And I would assume bringing up the Word/Excel API (still don’t see how to do that?) would require the same…
    But - would you need addition provisioning - to use the Word/Excel API???

  • @RajeevKumar-ns9du
    @RajeevKumar-ns9du Před 4 lety

    I have a requirement to open a word document from server in a new browser tab allow user to edit and save the document on browser. Upon saving the word file on server should get updated.

  • @sreenivasuludoniparthi7534

    How to insert a bookmark which refers to a link