I have the following code in Outlook. Is there a way to set testNum to whatever testNum was in the last email + 1? For example. If someone sent me an email and I replied, it should say "Please refer to this RFQ as Quote #1" for this person. If i receive another email, I want the email to say "Please refer to this RFQ as Quote #2".

Is there a way to globally set testNum and have it changed after every time i send a email?


Sub ReplyMSG()
Dim testNum As Double
Dim olItem As Outlook.MailItem
Dim olReply As MailItem ' Reply
testNum = 0
For Each olItem In Application.ActiveExplorer.Selection
Set olReply = olItem.ReplyAll
With olReply
.Body = "Please refer to this RFQ as Quote #" & testNum + 1
End With
olReply.Display
Next olItem
End Sub