Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    I need a VBA script or some ideas on how I can add a unique ID (UID) into a MS Word 2003 document.

    The unique ID would consist of a 4 char string prefix followed by an integer number. The 4 char prefix is set once for the document. The integer part would start at one and be incremented upwards each time a UID is added.

    Example UID: RTED1, RTED56, RTED781 etc.

    The general scenario of use is as follows.

    The user places the cursor at a location within a paragraph where the UID needs to be inserted.

    The user would then select either a toolbar icon or a short-cut key which would check to see what was the last integer number used, increment this and then insert the UID into the cursor position.

    The only specific font settings would be that the colour of the UID is red and bold, everything else such as font name, font size can be inherited from the paragraph style.

    The prefix and last integer number used needs to be retained with the document so that subsequent UID's can continue to be added in later editing sessions. Using existing document property fields to store the prefix and last integer number used would be OK eg: Keywords, Comments; but if there are any hidden meta data fields that could be used that would be ideal.

    Thanks in advance.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    [quote name='badga' post='771491' date='20-Apr-2009 20:35']I need a VBA script or some ideas on how I can add a unique ID (UID) into a MS Word 2003 document.[/quote]
    This is a duplicate of [topic="762662"]Inserting Unique ID's into MSWord Paragraphs (VB/VBA Board)[/topic]. Please DO NOT duplicate questions on different boards because the discussion becomes fragmented. Please review Lounge Rules and Guidelines, especially #14. Locking this thread.

Posting Permissions

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