|
-
Jan 8th, 2000, 10:41 PM
#1
Thread Starter
New Member
No matter how I define strA I get type mismatch error.
'Open word document and display in MSG
'box the document propertys'
'Defined strA many different ways with
'not luck
'Run time error 122 - Type mismatch
Dim wd As Object
Dim strA As String
Dim intB As Integer
Dim strB As String
Dim intCount As Integer
Set wd = CreateObject("Word.Basic")
wd.FileOpen "a:SummaryTest.doc"
For Cnt = 1 To wd.CountDocumentProperties()
strA = wd.DocumentPropertyName$(Cnt)
If wd.DocumentPropertyType(strA) = 1 Then
strB = wd.GetDocumentProperty(strA)
Else
'Run time error 122 - Type mismatch
strB = wd.GetDocumentProperty$(strA)
MsgBox "Property " & strA & " = " & strB
End If
Next
wd.FileClose 2
Set wd = Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|