获取Field BookMark(Get Field BookMark)
我在控制台应用程序中使用Microsoft.Office.Interop.Word命名空间从MSWord文档获取表单数据。 在这个MSWord doc中,每个字段都分配了一个书签,我将其用作id。
我希望能够检索字段的值,并将其存储在字典中。我只能获取每个字段的值,但不能获取书签和字段。
有没有办法可以做一些像wdField.Result.Bookmark来获取字段的书签? 我查看了MSDN文档,但是很难做到这一点。 这是我要枚举的foreach循环:
foreach (Field wdField in oWordDoc.Fields) { wdField.Select(); string fieldText = wdField.Result.Text Console.WriteLine(fieldText); //string fieldBookMark = wdField.Result.BookMark }
I am using the Microsoft.Office.Interop.Word namespace in a console application to get form data from a MSWord document. In this MSWord doc are fields that have each been assigned a bookmark which I am using as an id.
I would like to be able to retrieve the value of a field its bookmark and store it in a dictionary.I am only able to get the value of each field but not the bookmark AND the field.
Is there a way that I could do something like wdField.Result.Bookmark to get a field's bookmark? I looked at the MSDN documentation but am having a difficult time getting this right. Here is the foreach loop that I am enumerating with:
foreach (Field wdField in oWordDoc.Fields) { wdField.Select(); string fieldText = wdField.Result.Text Console.WriteLine(fieldText); //string fieldBookMark = wdField.Result.BookMark }
原文:https://stackoverflow.com/questions/17988632
最满意答案
尝试这个:
html, body{margin:0; height:100%;} header { height:100vh; background:url("file:///Users/FilePath/image.jpg") 50% / cover }
Try this:
html, body{margin:0; height:100%;} header { height:100vh; background:url("file:///Users/FilePath/image.jpg") 50% / cover }
相关问答
更多-
Olivia E Thorne
Brighton, UK
Some content...