Comments (4)
Hi, thanks for telling us about this issue. But I tried with your code, it give me correct search results.
So can you please provide more information about the error you got? Do you run this code with other functions? Thanks.
from office-js.
Hi, I'm running the code in Google Chrome and use Cloud9 IDE to code in.
I will try Visual studio code and see if the error persists.
When running (just the code and nothing else) the code I also get the correct results but then the error.
from office-js.
Just searching for the word 'the' for example results in no errors. Maybe it's the wildcard option?
/* global Office, Word, OfficeExtension */
'use strict';
(function() {
console.clear();
Office.initialize = function(reason) {
function ready() {
Word.run(function(context) {
var options = Word.SearchOptions.newObject(context);
options.matchWildCards = false;
var searchResults = context.document.body.search('the', options);
context.load(searchResults, 'text');
return context.sync().then(function() {
console.log(JSON.stringify(searchResults.items));
});
})
.catch(function(error) {
console.log('Error: ' + JSON.stringify(error));
if (error instanceof OfficeExtension.Error) {
console.log('Debug info: ' + JSON.stringify(error.debugInfo));
}
});
}
if (document.readyState !== 'loading') {
ready();
}
else {
document.addEventListener('DOMContentLoaded', ready);
}
};
}());
from office-js.
Sorry for the delay but this is no longer an issue anymore. Search works fine now.
from office-js.
Related Issues (20)
- Permission under manifest file HOT 5
- Content copy pasted as table not being considered as body text using getAsync(Office.CoercionType.Text) HOT 3
- categories.addAsync is failing with operation not supported error in new outlook in windows HOT 1
- Outlook add-ins are not working for a Gmail account. HOT 1
- displayMessageFormAsync does not work in Mac HOT 1
- Way to turn off track changes from office documents HOT 7
- Create Presentation/Excel API HOT 3
- Highlight custom tab on opening document HOT 5
- Trying to upload my add-in manifest no longer works HOT 14
- Outlook Exchange Online: When Plan to GA: Enable SSO in an Office Add-in using nested app authentication (preview) HOT 3
- HTML insertion in old Outlook desktop has incorrect fonts in tables
- Pinnable task panes do not stay pinned on refresh in modern Outlook web
- Taskpane Button Menu validation based on option with SupportsMultiSelect enabled HOT 1
- Office.context.mailbox.item.displayReplyAllForm attachments fails in Outlook Web platform HOT 4
- Excel freezes and crashes upon opening a specific file HOT 2
- Addin is not loading HOT 5
- Outlook add-in is not opening for some users in new Outlook for Windows UI HOT 2
- Outlook: Register the online-meeting template for Meta Horizon Workrooms HOT 1
- Broken "Always remember my choice for this application" checkbox and "Open" button for Excel Add-in's warning dialog HOT 10
- How to dynamically switch between read-only and editing modes of documents through the Word JavaScript API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-js.