[英]VBA to find specific text in word doc and copy this text from word doc into a cell in excel
[英]VBA to copy selected value of dropdown in Word Doc into specific Excel cell
我正在尝试从Word表单上选择的下拉框中返回文本。
doc一词是一个调查,其中包含带有多个下拉框的表单。 我想将调查对象从每个下拉列表中选择的值复制到Excel中的特定单元格中。
我已经尝试过诸如:
Activedocument.DropDowns("DropDown1").Value;
Activedocument.DropDowns("DropDown1").Text;
Activedocument.DropDowns("DropDown1").SelectedValue;
Activedocument.Shapes("DropDown1").Value etc etc.
我的代码的当前适用部分:
Dim dd14 As FormFields
With ActiveDocument
Set dd14 = ActiveDocument.FormFields("Dropdown14").DropDown.Value
Cells(iRow + 1, "H") = dd14
End With
要引用旧版表单下拉字段的值以获取值(即索引,而不是所选项目的文本),代码为:
activedocument.FormFields("dropdown1").DropDown.value
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.