Outlook 2003VBA Code to show today's date + a sequencial number

N

NotACoder

Hello,
I need a VBA code, so when I use Outlook 2003 template I have created, in
the subject line it will automatically create today's date+ a sequencial
number. Example:

Case # 1111091 or if it it the 12th email using that template it will be
11110912.

Thank you
 
S

Steve Rindsberg

NotACoder said:
Hello,
I need a VBA code, so when I use Outlook 2003 template I have created, in
the subject line it will automatically create today's date+ a sequencial
number. Example:

Case # 1111091 or if it it the 12th email using that template it will be
11110912.


Sub Test()
Debug.Print MakeNumber(42)
End Sub

Function MakeNumber(lSeqNum As Long) As Long
MakeNumber = CLng(Format(Now, "ddmmyy")) & lSeqNum
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top