Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using matchWildcards search in Word, the search API results and search box results appear differently #4992

Open
anybody-1 opened this issue Oct 21, 2024 · 2 comments
Assignees
Labels
Area: Word Issue related to Word add-ins Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown

Comments

@anybody-1
Copy link

Provide required information needed to triage your issue

When using matchWildcards search in Word, the search API results and search box results differently

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Mac/Pc
  • Host [Excel, Word, PowerPoint, etc.]: Word
  • Office version number: __script lab used version
  • Operating System: macos/windows

Expected behavior

the text is four _ , i want to serach middle tow __ 's range
set the document text is '____' , now i search '__', the word app(windows/mac) normal search is two results([1,2], [3,4]), when i use advance search, it's tree results([1,2]|[2,3]|[3,4]). and when i search by api like context.document.body.search("__", { matchWildcards: true }), it's two results([1,2][3,4]). i expect it's three results like word app advance search, because i want to find the range concat by second and three _

Current behavior

word search api return two results

Steps to reproduce

  1. set document text is '____'
  2. search "__" by matchWildcards Word.run(async (context) => { // Construct a wildcard expression and set matchWildcards to true in order to use wildcards. const results: Word.RangeCollection = context.document.body.search("__", { matchWildcards: true }); results.load("length"); await context.sync(); console.log('results', results.items) await context.sync(); })
  3. the console print is two results
@microsoft-github-policy-service microsoft-github-policy-service bot added the Area: Word Issue related to Word add-ins label Oct 21, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: attention 👋 Waiting on Microsoft to provide feedback label Oct 21, 2024
Copy link
Contributor

Thank you for letting us know about this issue. We will take a look shortly. Thanks.

@qinliuMSFT
Copy link
Member

Thank you for reporting this issue, I can repro it. It has been put on our backlog # 9469034, the team will investigate and we will reply to you as soon as there is any progress. Thank you for your patience.

@qinliuMSFT qinliuMSFT added Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Word Issue related to Word add-ins Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown
Projects
None yet
Development

No branches or pull requests

2 participants