LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Custom properties not showing the value when set programmatically

Hi,

When I create a CustomDocumentProperty programmatically and set the
LinkToContent value to True, the value is not available to use
programmatically before I have accessed the menu File-Properties.
To illustrate it I have included some sample code, just create a new
workbook and add a button to it. Paste the following code into the
"ThisWorkbook"

Private Sub Workbook_Open()
ActiveSheet.Range("A1").Value = "Test"
ActiveSheet.Names.Add Name:="TestName", RefersTo:="=Sheet1!$A$1"
ActiveWorkbook.CustomDocumentProperties.Add Name:="CustomProp",
LinkToContent:=True, Type:=msoPropertyTypeString, LinkSource:="TestName"
End Sub

Add the following code into the button event handler
MsgBox ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value

Is there a way to get Excel to populate the CustomDocumentProperties
programmatically, We are integrating all our documents with Meridio which is
a EDRM solution and this program use the DocumentProperties when storing the
documents

Regards
Jan Petter


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing Custom file properties in Header Flosp Excel Discussion (Misc queries) 1 August 14th 07 03:40 PM
Querying Properties programmatically BizMark Excel Discussion (Misc queries) 0 June 19th 06 04:17 PM
remove read only - not showing up in properties Hakara Excel Worksheet Functions 0 January 18th 06 07:35 PM
VBA Editor not showing list of properties & methods John Excel Programming 2 February 26th 04 04:21 PM
Objects not showing up in VBA properties aet-inc[_3_] Excel Programming 1 December 3rd 03 08:33 AM


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"