-
Notifications
You must be signed in to change notification settings - Fork 97
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
Preserving Original Text Style When Modifying Cell Content #5221
Comments
Hi @Raj-Dev1, thx for reaching out here.
|
Hi @RuizhiSunMS,
Let me know if you need any further information. |
Hi @Raj-Dev1, I did another try when waiting for experts' investigation and found something new.
|
Hi @RuizhiSunMS, |
@Raj-Dev1, sorry that I don't get your point very well. |
@RuizhiSunMS, we need to perform different actions on content controls based on whether they contain numeric or non-numeric values. Since there are multiple scenarios, we need to insert new content controls accordingly. |
Content control also has .search. If one identifies the type, one can sure manipulate the value instead of replacing the whole content control, even though there may be several types. |
@RuizhiSunMS How can I retrieve the original style and apply it to a new content control or cell body? |
You may can try like:
|
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! |
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue. |
Platform : PC desktop
Host: Word
Office version number: Microsoft® Word for Microsoft 365 MSO (Version 2411 Build 16.0.18227.20082) 64-bit
Operating System: Microsoft Windows 11 pro
Hi team,
I applied a style to the text, but when I cleared the cell's content and inserted new text and content control into the cell, the styling (font size and font family) changed. I want the text to retain its original style rather than inheriting the parent-level style. Is there a way to preserve the original style?
Before
After
The text was updated successfully, but these errors were encountered: