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

Office JS API: searchResults not returning results for tables having shape format applied to it. #4943

Closed
GajananVadekar opened this issue Oct 4, 2024 · 6 comments
Assignees
Labels
Area: Word Issue related to Word add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)

Comments

@GajananVadekar
Copy link

GajananVadekar commented Oct 4, 2024

Platform : PC desktop
Host: Word
Office version number: Microsoft® Word for Microsoft 365 MSO (Version 2404 Build 16.0.17531.20140) 64-bit
Operating System: Microsoft Windows 11 pro.

Hi team,
I am encountering an issue when using the Office JavaScript API to search for specific patterns inside a Word document, specifically within tables that are in a shape format. The search works fine for regular tables, but does not return results for tables embedded in a shape.

I am attempting to search for numeric patterns (e.g., [0-9.,]{1,}) throughout the document, including inside tables.

range = context.document.body;
searchResults = range.search('[0-9.,]{1,}', { matchWildcards: true });
searchResults.load("text,font/highlightColor,parentTableOrNullObject/isNull,parentContentControlOrNullObject");
await context.sync();

While this code successfully returns results for regular tables, it does not work for tables that are embedded within shapes.
Are there any specific properties, methods, or techniques that should be used to handle this scenario?

Expected Behavior:
The searchResults should return matches for numeric patterns within both regular tables and tables inside shapes.

Actual Behavior:
The searchResults return no matches for content inside tables embedded in a shape, even though numeric patterns are present in those tables.

Additional Information:
I have attached the Word document containing the specific table in shape format where the issue occurs for further investigation.

TestDocument.docx

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Oct 4, 2024
@EsterBergen
Copy link

@wangyun-microsoft - Can you please look into this?

@qinliuMSFT qinliuMSFT self-assigned this Oct 8, 2024
@qinliuMSFT
Copy link
Member

Hi @GajananVadekar , thank you for reporting this issue, I can reproduce this issue on win32 application. It has been put on our backlog #9414799, product team will follow up and we will reply to you as soon as there is progress.

@qinliuMSFT qinliuMSFT added Area: Word Issue related to Word add-ins Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Oct 8, 2024
@GajananVadekar
Copy link
Author

Hi @qinliuMSFT ,
Is there any update on when this backlog will be prioritized, and if any progress has been made so far?

@RuizhiSunMS
Copy link
Contributor

@GajananVadekar, sorry for the late response. Our experts did some investigations and found that this is a by-design behavior now. So that your case is a DCR actually. We recommend you to submit your request on https://techcommunity.microsoft.com/category/microsoft365/ideas/microsoft365developerplatform. Our PMs would review this part and convert requests with high votes into our real ADOs.

@RuizhiSunMS RuizhiSunMS added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown labels Dec 31, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label Jan 4, 2025
Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

Copy link
Contributor

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

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 Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity)
Projects
None yet
Development

No branches or pull requests

5 participants