totravel / minidocx

Fast and easy to use C++ library that creates or modifies Microsoft Word files without installing Word.
MIT License
90 stars 26 forks source link

How to open not exist document? #18

Open GermanAizek opened 8 months ago

GermanAizek commented 8 months ago

@totravel,

Example:

bool Document::Open(const std::string& path, bool createIfNotExist = false)
docx::Document doc;
doc->Open(path, true);

or C file functions be like

doc->Open(path, 'r');
doc->Open(path, 'w');
doc->Open(path, 'w+');
doc->Open(path, 'a');
doc->Open(path, 'rb');
totravel commented 8 months ago

Since this feature is not .docx specific, I prefer to discuss it in the next generation of minidocx.