Coder Social home page Coder Social logo

Comments (6)

AndrewGorovoy avatar AndrewGorovoy commented on August 10, 2024

I have the same error when try to highlight or search words with some style in document which has more than 100 pages.

Word.run(async (context) => {
    let paragraphs: Word.ParagraphCollection = context.document.body.paragraphs;
    let paragraphsCollections: Word.RangeCollection[] = [];
    paragraphs.load("items/NoPropertiesNeeded");
    await context.sync();
    console.log('Paragraphs Loaded');
    for (var index = 0; index < paragraphs.items.length; index++) {
       let wordRanges: Word.RangeCollection = paragraphs.items[index].getTextRanges([" "]);
       paragraphsCollections.push(wordRanges.load("font, text"));       
    }
    console.log('Prepare for loading words');
    await context.sync();
    console.log('Words Loaded');
    console.log(paragraphsCollections.length);
    paragraphsCollections.forEach((element, index, array) => {
        //Words processing
    })
    console.log("processed");
        return context.sync();
    }).catch((error) => {
       this.errorEmitter.emit(error);
    });

It works fine, but when office try to save changes it crashes
exampleDoc.docx

from office-js.

AlexYovenko avatar AlexYovenko commented on August 10, 2024

Hi @JuaneloJuanelo
Please advice maybe I doing something in wrong way?

from office-js.

kbrandl avatar kbrandl commented on August 10, 2024

Transferring this issue from OfficeDev/office-js-docs into OfficeDev/office-js, as it seems to be a product bug. @AlexYovenko and @AndrewGorovoy are you still observing these issues?

from office-js.

JuaneloJuanelo avatar JuaneloJuanelo commented on August 10, 2024

i just tried the sample code to replace with a 100+ page document. It was slow but all the code got successfully executed. Did not get any errors.

from office-js.

docu-bill avatar docu-bill commented on August 10, 2024

i just tried the sample code to replace with a 100+ page document. It was slow but all the code got successfully executed. Did not get any errors.

Did you try it with the example document?

from office-js.

Yuchao9145 avatar Yuchao9145 commented on August 10, 2024

Issue still happening, it happens randomly from time to time

from office-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.