1. Version.h 신규 작성

  #define AUTOFILEVERSION          1,0,0,0
  #define AUTOPRODUCTVERSION       1,0,0,0
  #define AUTOFILEVERSIONSTRING    "1, 0, 0, 0"
  #define AUTOPRODUCTVERSIONSTRING "1, 0, 0, 0"
  #define AUTOSPECIALBUILDSTRING   "2005-04-28 Last Builed"

2. Project.rc 중에서 아래 부분 수정

  /////////////////////////////////////////////////////////////////////////////
  //
  // Version
  //
  #include "Version.h"
  VS_VERSION_INFO VERSIONINFO
   FILEVERSION AUTOFILEVERSION
   PRODUCTVERSION AUTOPRODUCTVERSION
   FILEFLAGSMASK 0x3fL
  #ifdef _DEBUG
   FILEFLAGS 0x21L
  #else
   FILEFLAGS 0x20L
  #endif
   FILEOS 0x4L
   FILETYPE 0x2L
   FILESUBTYPE 0x0L
  BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", ""
            VALUE "CompanyName", ""
            VALUE "FileDescription", "f_sso module"
            VALUE "FileVersion", AUTOFILEVERSIONSTRING
            VALUE "InternalName", "f_sso"
            VALUE "LegalCopyright", "Copyright 2005 Fasoo.com"
            VALUE "LegalTrademarks", ""
            VALUE "OLESelfRegister", ""
            VALUE "OriginalFilename", "f_sso.dll"
            VALUE "PrivateBuild", ""
            VALUE "ProductName", "f_sso module"
            VALUE "ProductVersion", AUTOPRODUCTVERSIONSTRING
            VALUE "SpecialBuild", AUTOSPECIALBUILDSTRING
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
  END

3. Macro 작성
 
Sub Application_BuildFinish(numError, numWarning)
    if numError <> 0 then
       exit sub
    end if

    dim fullpath
    prjDir = GetProjectDir(ActiveProject.FullName)
    Documents.Open prjDir & "versionno.h"

    dim selection
    set selection = ActiveDocument.Selection
    selection.StartOfDocument

    '//FILEVERSION
    ReplaceText selection, 9, 1
    selection.LineDown
    selection.StartOfLine

    '//PRODUCTVERSION
    ReplaceText selection, 9, 1
    selection.LineDown
    selection.StartOfLine

    '//STRFILEVER
    ReplaceText selection, 10, 1
    selection.LineDown
    selection.StartOfLine

    '//STRPRODUCTVER
    ReplaceText selection, 10, 1
    selection.LineDown
    selection.StartOfLine

    '//STRSPECIALBUILD
    ReplaceSpecialBuild selection, 4
    selection.LineDown
    selection.StartOfLine

    ActiveDocument.Save
    ActiveDocument.Close
End Sub

Sub ReplaceSpecialBuild(selection, count)
    dim yy, mm, dd
    yy = Year(Now())
    mm = Month(Now())
    if CInt(mm) < 10 then
        mm = "0" & mm
    end if
    dd = Day(Now())
    if CInt(dd) < 10 then
       dd = "0" & dd
    end if
    selection.WordRight dsMove, count
    selection.WordRight dsExtend, 5
    selection.Text = yy & "-" & mm & "-" & dd & " "
End Sub

Sub ReplaceText(selection, count, incrementby)
    selection.WordRight dsMove, count
    selection.WordRight dsExtend, 1
    selection.Text = CInt(selection.Text) + incrementby
End Sub