///////////////////////////////////////////////////////////////////////////// // // 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
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