Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jon,
I replicate what you describe in XL2000, can't see an obvious solution without flashing the file properties dialog. After showing the dialog .Value returns as expected. If I now change the value in the linked cell A1, .Value returns the old value, need to see the dialog again for it to be updated. FWIW, after defining the custom property and not seeing the dialog, the returned value appears to be 122 bytes of meaningless (to me) numbers. dim arr() as byte arr = ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value ' arr 0 to 121 Regards, Peter T "Jan Petter" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This problem exists in the XL2003 SP2 version also.
We have a lot of users that will use the excel spreadsheets and it cant bee expected that they will access the File-properties menu before they save the workbooks. So if a solution or workaround for this problem exists I would really like to hear about it. Jan Petter "Peter T" wrote: Hi Jon, I replicate what you describe in XL2000, can't see an obvious solution without flashing the file properties dialog. After showing the dialog .Value returns as expected. If I now change the value in the linked cell A1, .Value returns the old value, need to see the dialog again for it to be updated. FWIW, after defining the custom property and not seeing the dialog, the returned value appears to be 122 bytes of meaningless (to me) numbers. dim arr() as byte arr = ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value ' arr 0 to 121 Regards, Peter T "Jan Petter" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jan,
Does this help ? NickHK "Jan Petter" wrote in message ... This problem exists in the XL2003 SP2 version also. We have a lot of users that will use the excel spreadsheets and it can't bee expected that they will access the File-properties menu before they save the workbooks. So if a solution or workaround for this problem exists I would really like to hear about it. Jan Petter "Peter T" wrote: Hi Jon, I replicate what you describe in XL2000, can't see an obvious solution without flashing the file properties dialog. After showing the dialog .Value returns as expected. If I now change the value in the linked cell A1, .Value returns the old value, need to see the dialog again for it to be updated. FWIW, after defining the custom property and not seeing the dialog, the returned value appears to be 122 bytes of meaningless (to me) numbers. dim arr() as byte arr = ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value ' arr 0 to 121 Regards, Peter T "Jan Petter" wrote in message ... 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, not really. See my previous response
Jan Petter "NickHK" wrote: Jan, Does this help ? NickHK "Jan Petter" wrote in message ... This problem exists in the XL2003 SP2 version also. We have a lot of users that will use the excel spreadsheets and it can't bee expected that they will access the File-properties menu before they save the workbooks. So if a solution or workaround for this problem exists I would really like to hear about it. Jan Petter "Peter T" wrote: Hi Jon, I replicate what you describe in XL2000, can't see an obvious solution without flashing the file properties dialog. After showing the dialog .Value returns as expected. If I now change the value in the linked cell A1, .Value returns the old value, need to see the dialog again for it to be updated. FWIW, after defining the custom property and not seeing the dialog, the returned value appears to be 122 bytes of meaningless (to me) numbers. dim arr() as byte arr = ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value ' arr 0 to 121 Regards, Peter T "Jan Petter" wrote in message ... 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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jan,
Forgot the link.... Does this help ? http://www.cpearson.com/excel/docprop.htm NickHK "Jan Petter" wrote in message ... This problem exists in the XL2003 SP2 version also. We have a lot of users that will use the excel spreadsheets and it can't bee expected that they will access the File-properties menu before they save the workbooks. So if a solution or workaround for this problem exists I would really like to hear about it. Jan Petter "Peter T" wrote: Hi Jon, I replicate what you describe in XL2000, can't see an obvious solution without flashing the file properties dialog. After showing the dialog .Value returns as expected. If I now change the value in the linked cell A1, .Value returns the old value, need to see the dialog again for it to be updated. FWIW, after defining the custom property and not seeing the dialog, the returned value appears to be 122 bytes of meaningless (to me) numbers. dim arr() as byte arr = ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value ' arr 0 to 121 Regards, Peter T "Jan Petter" wrote in message ... 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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Unfortunately the examples in the document do not help. I have changed my code to reflect the examples and I have tried to use the €œDS: OLE Document Properties 2.0 Object Library" but with no luck Jan Petter "NickHK" wrote: Jan, Forgot the link.... Does this help ? http://www.cpearson.com/excel/docprop.htm NickHK "Jan Petter" wrote in message ... This problem exists in the XL2003 SP2 version also. We have a lot of users that will use the excel spreadsheets and it can't bee expected that they will access the File-properties menu before they save the workbooks. So if a solution or workaround for this problem exists I would really like to hear about it. Jan Petter "Peter T" wrote: Hi Jon, I replicate what you describe in XL2000, can't see an obvious solution without flashing the file properties dialog. After showing the dialog .Value returns as expected. If I now change the value in the linked cell A1, .Value returns the old value, need to see the dialog again for it to be updated. FWIW, after defining the custom property and not seeing the dialog, the returned value appears to be 122 bytes of meaningless (to me) numbers. dim arr() as byte arr = ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value ' arr 0 to 121 Regards, Peter T "Jan Petter" wrote in message ... 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 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jan,
Seems that a "ActiveWorkbook.Save" flushes the value, so it can be correctly read. Office2K anyway. NickHK "Jan Petter" wrote in message ... Hi, Unfortunately the examples in the document do not help. I have changed my code to reflect the examples and I have tried to use the "DS: OLE Document Properties 2.0 Object Library" but with no luck Jan Petter "NickHK" wrote: Jan, Forgot the link.... Does this help ? http://www.cpearson.com/excel/docprop.htm NickHK "Jan Petter" wrote in message ... This problem exists in the XL2003 SP2 version also. We have a lot of users that will use the excel spreadsheets and it can't bee expected that they will access the File-properties menu before they save the workbooks. So if a solution or workaround for this problem exists I would really like to hear about it. Jan Petter "Peter T" wrote: Hi Jon, I replicate what you describe in XL2000, can't see an obvious solution without flashing the file properties dialog. After showing the dialog .Value returns as expected. If I now change the value in the linked cell A1, .Value returns the old value, need to see the dialog again for it to be updated. FWIW, after defining the custom property and not seeing the dialog, the returned value appears to be 122 bytes of meaningless (to me) numbers. dim arr() as byte arr = ActiveWorkbook.CustomDocumentProperties("CustomPro p").Value ' arr 0 to 121 Regards, Peter T "Jan Petter" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Showing Custom file properties in Header | Excel Discussion (Misc queries) | |||
Querying Properties programmatically | Excel Discussion (Misc queries) | |||
remove read only - not showing up in properties | Excel Worksheet Functions | |||
VBA Editor not showing list of properties & methods | Excel Programming | |||
Objects not showing up in VBA properties | Excel Programming |