Results 1 to 2 of 2
2007-03-27, 10:56 #1
- Join Date
- Jan 2002
- London, Gtr London, England
- Thanked 0 Times in 0 Posts
Custom Property or template (All)
Just wondering. I have a list of names (at the moment 6 but could longer but not longer than 10) that I need to display on the front cover of a document. The names refer to the origin of document. For example, if the doc was produced in Hong Kong it would say Hong Kong on the cover page, Japan for Japan etc.
I store the document origin in the custom document property, i.e. 1 for UK, 2 for HK, 3 for US, 4 for Japan etc.
Therefore the question is:
do I also store the names in the custom document property (United Kingdom;Hong Kong;United States;Japan;France;Canada...) & then use the split function to access the required value
Function GetOrigin(iCNIndex As Long) As String
Dim strArray() As String
strArray = Split(GetValueOfCDP("DocOrigin"), ";") ' DocOrigin=United Kingdon;Hong Kong;United States;Japan;Canada'...
GetCompanyName = strArray(iCNIndex)
do I place individual values in the template and set value in a function (using a switch statement) based on the document origin value in the custom document property?
Select Case ActiveDocument.CustomDocumentProperties("ICNIndex" ).Value
lOrigin = "United Kingdom"
lOrigin = "Hong Kong"
Case 3 ...
Which is better? To me storing in CDP is easier but would it make the document much larger & are there any other implications?
2007-03-27, 11:37 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Custom Property or template (All)
Since you're using custom document properties anyway, why not store the name (such as "Hong Kong") instead of the code (such as 2) in a custom document property? Or if you need the code for other purposes, why not store the code and the name in two separate document properties?