Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    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)
    End Function


    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
    Case 1
    lOrigin = "United Kingdom"
    Case 2
    lOrigin = "Hong Kong"
    Case 3 ...
    Case 4...
    End Select

    Which is better? To me storing in CDP is easier but would it make the document much larger & are there any other implications?



  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts