VBOffice

Create a Serial Number

This sample creates a serial number, which you could use, for instance, to index task items.

Last modified: 2006/01/20 | Accessed: 29.256  | #15
◀ Previous sample Next sample ▶
OLKeeper OLKeeper
OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails.

This sample creates a serial number and stores it in a simple text file. Please note, the directory must already exist while the file will automatically be created if necessary.


tip  How to add macros to Outlook
Public Function GetNextID() As Long
  Dim lCurrID As Long
  Dim File As String

  File = "C:Sample.txt"
  lCurrID = Val(ReadFile(File))
  lCurrID = lCurrID + 1
  WriteFile File, CStr(lCurrID), False
  GetNextID = lCurrID
End Function
Category-Manager Category-Manager
Access the master category list in the blink of an eye, share your color categories in a network, get a reminder service, and more.
email  Send a message