objDoc.FormFields.Item(i).Result 这个只能读到WORD 中的FormFields的值
解决方案 »
- vb中,如何做到在一个picturebox内画的图形(不是装入的图像),在另一个picturebox中显示出来?除了重画以外有没有更有效的方法?
- 想问一个有关滞纳金公式的问题。题目见内容。
- Des加密问题
- Calendar控件,用戶安裝后不能現實日期的數字,但是選擇后可以取得選擇的日期,請問需要注冊什么*.OCX? DLL?
- 有意思的老人源码
- 今天心情好, 升到五个三角形了, 偶来散点分, 顶者有份!
- 请问如何将工具栏上的图标和ImageList的图标对应上
- rs.fields('name')这样写,合法吗?
- 复制文件的问题
- 我的VB在XP下打包后又在同一台机子上安装,除了问题
- 关于datareport的问题
- 跪地先磕仨响头,求各位大侠帮忙!!!
shapes 集合,inlineshapes集合,等等Excel成功了,word就是不行,明天再试up
Dim objDocument As Word.Document
Dim objApp As Word.Application
Set objApp = New Application
Set objDocument = objApp.Documents.Open("C:\YWG\B.DOC")
'objDocument.VBProject.Protection=
objDocument.Activate
Dim i As Indexes
Dim j As Long
For j = 1 To objDocument.FormFields.Count Step 1
On Error Resume Next
Debug.Print j; objDocument.FormFields.Item(j).Result
Next j
objDocument.Close
objApp.Quit
End Sub
Public Sub test()
Dim obj As Object
Dim iCount As Long
Dim i As Long
iCount = ThisDocument.InlineShapes.Count
Dim strType As String
For i = 1 To iCount Step 1
Set obj = ThisDocument.InlineShapes(i).OLEFormat.Object
strType = ThisDocument.InlineShapes(i).OLEFormat.ClassType
Select Case strType
Case "Forms.ComboBox.1"
Debug.Print i; obj.Name; vbTab; obj.Value
Case "Forms.CheckBox.1"
Debug.Print i; obj.Name; vbTab; obj.Value
Case "Forms.CommandButton.1"
Debug.Print i; obj.Name; vbTab; obj.Caption
Case "Forms.TextBox.1"
Debug.Print i; obj.Name; vbTab; obj.Text
End Select
Next i
End Sub