M
Martin
I have code when invoked on a new mail item with subject = 3089 and cursor
left in subject field that acts differently (in debugging) when locals myItem
is expanded or not. When not expanded, sr_number ="", when expanded,
sr_number ="3089".
How can I accomplish the assignment? It appears the information exists,
just how to get to it??
-----
Public Sub SSP_Req_Notification()
Dim initialSubj, finalSubj As String
Dim objOLApp As Outlook.Application
Dim NewMail As Outlook.MailItem
Dim myRecipient As Outlook.Recipient
Dim sr_number As String
Dim myItem As Outlook.MailItem
Set myItem = Application.ActiveInspector.CurrentItem
sr_number = myItem.Subject '1
sr_number = myItem.Subject '2
sr_number = myItem.ConversationTopic '3
sr_number = myItem.TaskSubject '4
myItem.SentOnBehalfOfName = "(e-mail address removed)"
myItem.Recipients.Add ("(e-mail address removed)")
myItem.Recipients.Add ("jy. mias")
Exit Sub
----------------------------
After execution of line tagged '1
: sr_number : "" : String
After expanding myItem in locals window and execution of line tagged '2
: sr_number : "3089" : String
Display of myItem.subject after expanding
: Subject : "3089" : String
left in subject field that acts differently (in debugging) when locals myItem
is expanded or not. When not expanded, sr_number ="", when expanded,
sr_number ="3089".
How can I accomplish the assignment? It appears the information exists,
just how to get to it??
-----
Public Sub SSP_Req_Notification()
Dim initialSubj, finalSubj As String
Dim objOLApp As Outlook.Application
Dim NewMail As Outlook.MailItem
Dim myRecipient As Outlook.Recipient
Dim sr_number As String
Dim myItem As Outlook.MailItem
Set myItem = Application.ActiveInspector.CurrentItem
sr_number = myItem.Subject '1
sr_number = myItem.Subject '2
sr_number = myItem.ConversationTopic '3
sr_number = myItem.TaskSubject '4
myItem.SentOnBehalfOfName = "(e-mail address removed)"
myItem.Recipients.Add ("(e-mail address removed)")
myItem.Recipients.Add ("jy. mias")
Exit Sub
----------------------------
After execution of line tagged '1
: sr_number : "" : String
After expanding myItem in locals window and execution of line tagged '2
: sr_number : "3089" : String
Display of myItem.subject after expanding
: Subject : "3089" : String