E
E
Evgeny Petryaev2019-10-11 11:09:50
C++ / C#
Evgeny Petryaev, 2019-10-11 11:09:50

Work with a word file from a program?

In general, you need to write data from the program (string) to a word file

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Adamos, 2019-10-11
@Adamos

In a simple way - you form html, call it .docx, Word will open it and not wince.
More difficult - you form rtf, then follow the same pattern.
Seriously - to delve into COM / OLE and get a monster that just like that on an arbitrary machine may still not start due to the lack of Word libraries.
Well, and for the heroes - look at the sources of alternative offices ...
PS Yes, perhaps the second part of the answer is outdated, because. referred to .DOC.
More or less open DOCX made it possible to rivet third-party libraries to create it.

S
Stanislav Makarov, 2019-10-11
@Nipheris

Well, if it's straight from the C++ code, try the libraries:
- DuckX
- DocxFactory

M
mayton2019, 2019-10-11
@mayton2019

If docx then you can. This is a zip archive containing xml documents. And if you place your
placeholders (such unique strings) inside in advance, then you can find them with a string replacement.
The solution is so-so. C grade, but sometimes it works when there are no parsers at hand.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question