![]() |
#1
|
|||
|
|||
![]()
Greetings
So I am creating a new email message and I want to append a certain string to the subject (eg. date in ddmmyyyyhhmm format). How can that be done? I'm trying that in VB (unless there is another way), but I couldn't find a method to get a reference of the current new email message. This will allow me to run the macro which results in appending the required string. Any help is appreciated. e.g. 'this is just bad... Sub DateTag() 'Dim MyMail As mailItem Dim strID As String Dim mailNS As Outlook.NameSpace Dim mailItem As Outlook.mailItem 'strID = MyMail.EntryID Set mailNS = Application.GetNamespace("MAPI") Set mailItem = mailNS.GetItemFromID(strID) mailItem.Subject = "date" mailItem.Save Set mailItem = Nothing Set mailNS = Nothing End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ElfegoBaca | Word VBA | 1 | 05-26-2011 09:40 PM |
Macros | Steveg | Word VBA | 0 | 08-18-2010 04:04 PM |
![]() |
Desertwrangler | Word VBA | 6 | 06-25-2010 07:06 AM |
macros | trancetheory | Outlook | 0 | 05-11-2010 09:31 AM |
![]() |
krdzal | Excel | 1 | 04-06-2010 07:43 AM |