Subject line

Good morning.

Am trying to add an increasing formular into my subject line on MS Outlook 2010.

I would ike it to be in date for YYYYMMDD- (20150427-)

How would i go about doing this and what formula would i need to use?

May 27th, 2015 6:05am

It would be easier to use a macro to edit and update the subject line, but there is a convoluted method you could use in a custom form, or you could use vbscript in a custom form. Because you can't set the form as the default, a macro would be better. do you want every message to have this subject line or just some?

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 8:16am

Thanks fo the reply.

I would like every new message to default with this subject line.

May 27th, 2015 8:25am

At the very basic level, this macro will create a new message and add the date + a number. The number is saved in memory and goes up as long as outlook is open.  it'll start back at 1 if you close outlook.

Dim i As Long

Public Sub CreateNewMessage()
Dim objMsg As MailItem
i = i + 1
Set objMsg = Application.CreateItem(olMailItem)
 
 With objMsg
  .Subject = Format(Date, "yyyymmdd") & "-" & i
  .Display
End With
 
Set objMsg = Nothing
End Sub

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 1:01pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics