Paragraph lose formatting after using InsertOOXML method #272
Comments
Interesting find... Will check it in my environment. If it is really so, it may be a problem for me, as our users often change formatting. |
@JuaneloJuanelo Any update here? |
@JuaneloJuanelo, I found a similar problem on my app. Please tell me what you think about this bug. |
Hello @JuaneloJuanelo, Any update here? |
Hi, Any update, advice? |
Hello i just saw this. Btw this types of issues are better to be shared in stack! , the goal of github is to talk about the designs of the API. I am trying to repro the issue now. thanks! |
Ok Alex, here is the result of the investigation. We do have a small bug. if you copy paste the contents of your before.docx document into a blank document you will see that the style for "Normal" is overwritten in the new document. if you copy paste the contents of your before.docx into a document already using the "Normal" style (i.e. type a few letters on it with the normal style) you will see that the Normal style of the pasted text will be be like the Normal style of the new document (youre before.docx Normal style will be ignored, basically) This is a by-design behavior in Word, we don't want to modify the style of the existing content. Now, I have one advice for you. Instead of using the Normal style, i recommend you to create a new one, this will safely propagate your OOXML with the intended style. (please try creating a style using OOXML as well!) thanks for reporting this issue and let me know if you have additional meta-questions. |
The problem here that we not owners of documents that will be used in Office add-in app, client create their own templates with their styles settings. Thank for review this, we will wait for fix, when you think it's can be released? >Btw this types of issues are better to be shared in stack! |
You can post questions to StackOverflow, tagged with office-js. Thanks! |
Hello,
My team faced with issue that after document was converted to OOXML by using getOOXML method and then inserted into document by using InsertOOXML - paragraphs that have "Normal" style lose their formatting.
We run some investigation and found that after getOOXML method formatting inside converted to XML structure still exist:
As well in styles part:
But after we insert this OOXML to document - paragraph lose formatting and just use regular formatting option for Normal style.
I think it's a bug, please advice.
Attached before.docx document - it's document created in Native MS Word with custom formatting for Normal style.
after.docx - inserted OOXML by Office JavaScript API
after.docx
Before.docx
ooxml.txt
The text was updated successfully, but these errors were encountered: