c# - WordprocessingDocument object: get filename property -
is possible filename property of wordprocessingdocument object? know when instantiate object, need provide path file, need filename instantiated object.
stream stream = new filestream(@"c:\users\username\documents\document_name.docx", filemode.open, fileaccess.read, fileshare.readwrite); wordprocessingdocument doc = wordprocessingdocument.open(stream, false);
i want 'document_name' string doc object.
i prefer use office com assemblies communication between application , office document. gives more functionalities , it's quite easy use.
include namespace microsoft.office.interoperability.word
in code start that.
declare word.application
object , use open, edit, extract data word document, including documents properties.
leave filestream
handling large text files.
Comments
Post a Comment