Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
(C#)如何从Word或Excel文件检索Author/Comments属性?_C#_File_Properties_Ms Office - Fatal编程技术网

(C#)如何从Word或Excel文件检索Author/Comments属性?

(C#)如何从Word或Excel文件检索Author/Comments属性?,c#,file,properties,ms-office,C#,File,Properties,Ms Office,我需要从Excel或Word文件中读取注释。。。 有什么想法吗 我尝试了FileVersionInfo但似乎不起作用 我还尝试使用Shell32选项,它确实有效。似乎还有很长的路要走 有没有更快的办法 谢谢您是在谈论修订版的评论吗?你可以用 使用COM启动Excel或Word实例,并询问他们?这就是Shell在做什么,当你问它的时候…阅读答案。也许会有帮助。您可以在这里找到解决方案: Comments comments = yourwordDoc.Comments; foreac

我需要从Excel或Word文件中读取注释。。。 有什么想法吗

我尝试了
FileVersionInfo
但似乎不起作用

我还尝试使用Shell32选项,它确实有效。似乎还有很长的路要走

有没有更快的办法


谢谢

您是在谈论修订版的评论吗?你可以用


使用COM启动Excel或Word实例,并询问他们?这就是Shell在做什么,当你问它的时候…阅读答案。也许会有帮助。您可以在这里找到解决方案:
Comments comments = yourwordDoc.Comments;
        foreach (var comment in comments)
        {
            var text = comment.Range.Text;


        }