Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Does custom document property exist
Using Office 2003 on Win XP;
I need a function I can call that checks to see if a custom document property exists; if not add it with a token string entry... If anyone can post a generic example it would be most appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Does custom document property exist
Function CustomPropValue(prop As String)
Dim propValue As Variant On Error Resume Next propValue = ActiveWorkbook.CustomDocumentProperties(prop) On Error GoTo 0 If IsEmpty(propValue) Then propValue = "Initial" ActiveWorkbook.CustomDocumentProperties.Add _ Name:=prop, _ LinkToContent:=False, _ Type:=msoPropertyTypeString, _ Value:=propValue End If CustomPropValue = propValue End Function -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "XP" wrote in message ... Using Office 2003 on Win XP; I need a function I can call that checks to see if a custom document property exists; if not add it with a token string entry... If anyone can post a generic example it would be most appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Does a HasDependents = True property exist? | Excel Discussion (Misc queries) | |||
Use Custom Document Property to identify xls files not yet process | Excel Programming | |||
Putting the document number custom property in workbook | Excel Programming | |||
Can you link a custom property to an Excel custom header text? | Setting up and Configuration of Excel | |||
convert existing Excel into Data source document to link to exist. | Excel Discussion (Misc queries) |