I've been tasked with removing the send button from the default outlook form. I think it's called IPM.note. I ended up having to create a custom form and use some vbscript to get it have some semblance of normal functionality. We have a custom send button that ties into the item_send event in a non-transparent way so I'm unable to rely on that as a solution.
The first issue was when hitting reply the Body field doesn't automatically have input focus. I found a solution in vbscript which i'm going to share below because it took hours to figure out in and I couldn't find a solution on google. May it save future posters some time.
Sub Item_Open()
strSubject=Item.Subject
strPos = instr(strSubject,":")
strParse=left(strSubject, strPos)
if inStr(strParse,"RE:")then
Set objPage = Item.GetInspector.ModifiedFormPages("Message")
Set txtField = objPage.Controls("Message")
txtField.SetFocus()
EndIf
EndSub
As for my question i've noticed once you create a custom form you no longer have the option of adding "FROM" and "BCC" Fields in the ribbon. I added a BCC field to my form but i'm having issues with the From field. I want that.. when the user hits reply or new message the from field populates with the default account or email address.
I've Tried:
Set objPage2 = Item.GetInspector.ModifiedFormPages("Message")
Set txtField2 = objPage2.Controls("From")
txtField2.Value="user@someplace.com"
but this apparently isn't a supported action. At this point i'm kinda dead in the water. I'm normally an app developer so i'm 90% sure i'm doing this the wrong way or using the wrong tech. Any guidance would be very appreciated
The first issue was when hitting reply the Body field doesn't automatically have input focus. I found a solution in vbscript which i'm going to share below because it took hours to figure out in and I couldn't find a solution on google. May it save future posters some time.
Sub Item_Open()
strSubject=Item.Subject
strPos = instr(strSubject,":")
strParse=left(strSubject, strPos)
if inStr(strParse,"RE:")then
Set objPage = Item.GetInspector.ModifiedFormPages("Message")
Set txtField = objPage.Controls("Message")
txtField.SetFocus()
EndIf
EndSub
As for my question i've noticed once you create a custom form you no longer have the option of adding "FROM" and "BCC" Fields in the ribbon. I added a BCC field to my form but i'm having issues with the From field. I want that.. when the user hits reply or new message the from field populates with the default account or email address.
I've Tried:
Set objPage2 = Item.GetInspector.ModifiedFormPages("Message")
Set txtField2 = objPage2.Controls("From")
txtField2.Value="user@someplace.com"
but this apparently isn't a supported action. At this point i'm kinda dead in the water. I'm normally an app developer so i'm 90% sure i'm doing this the wrong way or using the wrong tech. Any guidance would be very appreciated