Add picture element to docm in c# - open xml

M D 1 Reputation point
2022-08-12T09:24:28.287+00:00

Hi

I try to add picture element to docm document in c# application. Unfortunatly after this i get message document is damaged in part \word\document.xml row:1 column:0. Xml structure document.xml is correct. I using example from this link https://learn.microsoft.com/en-us/office/open-xml/how-to-insert-a-picture-into-a-word-processing-document. Docx document works fine. Problem is docm document. If i remove picture element from docm document , all is fine. Some one of you had similar problem?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,217 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,471 questions
0 comments No comments
{count} votes