Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Arland Smith   on Sep 16 In MS Office Category.

  
Question Answered By: Alice Hughes   on Sep 16

Try this:

Sub Test()
Set MyObj = CreateObject("Excel.Application")
'MyObj.Visible = 1
MyObj.Workbooks.Open ("C:myfile.xls")

c = MyObj.Workbooks(1).CustomDocumentProperties.Count

For Each prop In MyObj.Workbooks(1).CustomDocumentProperties
n = prop.Name
v = prop.Value
MsgBox n & "=" & v
Next
MyObj.Quit
Set MyObj = Nothing
End Sub

Share: 

 
 
Didn't find what you were looking for? Find more on Getting Excel DSO Properties in VBA Code Or get search suggestion and latest updates.


Tagged: