Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Kent, England
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating templates for different environments (Office 2003/Office XP)

    Can anyone help !!!

    I have created a template which needs to be deployed to two environments (Office 2003 and Office XP). My ideal is to have one template that can identify the environment the user is in, I believe this can be set up through code but am unsure how to do it. The reason for needing the one template is that the template resides in a different location so I would like to set up a line of code that basically says "If in this environment then set this location but if in this environment set this location".

    I am fairly sure it can be done but not too sure how to do it.

    Many thanks
    Jackie

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Creating templates for different environments (Office 2003/Office XP)

    You only mention Office in the subject. What kind of template are you talking about? Word, Excel, PowerPoint?

  3. #3
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Kent, England
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating templates for different environments (Office 2003/Office XP)

    Apologies Microsoft Word.

    Regards
    Jack

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Creating templates for different environments (Office 2003/Office XP)

    Application.Version will return 8.0 for Word 97, 9.0 for Word 2000, 10.0 for Word 2002 (XP) and 11.0 for Word 2003. So you could have code like this:

    Select Case Application.Version
    Case "8.0"
    ' code for Word 97 goes here
    ...
    Case "9.0"
    ' code for Word 2000 goes here
    ...
    Case "10.0"
    ' code for Word 2002 goes here
    ...
    Case "11.0"
    ' code for Word 2003 goes here
    ...
    End Select

  5. #5
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Kent, England
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating templates for different environments (Office 2003/Office XP)

    Thanks as always Hans. Was obviously being a bit thick on this one !!! I thought I had to use a "#" to identify the version I was using hence I never even tried Application.Version.

    Have a good weekend
    Jackie

Posting Permissions

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