Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-11-2016, 08:33 AM
vince692 vince692 is offline Get CustomDocumentProperties Windows 7 64bit Get CustomDocumentProperties Office 2010 32bit
Novice
Get CustomDocumentProperties
 
Join Date: May 2016
Posts: 22
vince692 is on a distinguished road
Default Get CustomDocumentProperties

I want to read CustomDocumentProperties, here is my code but i can't get the


"ActiveDocument.CustomDocumentProperties.Count " working :
I tried with "ThisDocument.CustomDocumentProperties.Count" as well.

In Excel, "ThisWorkbook.CustomDocumentProperties.Count" works.

Code:
'Read CustomDocumentProperties in a WordDocument
Dim cp As DocumentProperty

'Check if CustumDocumentProperties exist ...
If ActiveDocument.CustomDocumentProperties.Count = 0 Then
MsgBox "Generation path not found"
Exit Sub

For Each cp In ActiveDocument.CustomDocumentProperties
    MsgBox cp.Name & vbLf & cp.Value
Next cp
End If
Any ideas ?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get CustomDocumentProperties Document Variables vs CustomDocumentProperties Cosmo Word VBA 2 08-11-2014 01:35 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft