G
Guest
Scenario: Need to open a user form on open of Outlook Template (.oft) and
have it auto open a UserForm to populate then have a subject and message body
creaded from information entered in the UserForm.
Problem: Have a standard template where the To: and CC: field are
semi-permanent (i.e will only change if someone leave the company, but needs
to be changed at template level rather than in VB). The data in the message
body is volitile but is consistantly the same type of information in the same
format...see below. Need to have a easy way to input this information into
the e-mail and then allow changes before send.
Main problem is I do not know and can not understand the object names in
Outlook
Sample completed e-mail:
Please dispatch Tech to center <TxtBxCenter> to complete <TxtBxIssue>
Technician must call <TxtBxTech> at <TxtBxPhone> after equipment is
installed, for further instructions.
Please dispatch at Severity <TxtBxSev>. <TxtBxReason>.
Equipment will arrive <TxtBxDate> by 10:30 <TxtBxTZ>
Center is open from <TxtBxHO> to <TxtBxHC> <TxtBxTZ>
Sample Code so far:
In Microsoft Outlook Object.This Outlook Session
Private Sub ThisOutlookSession_Open()
TSGRequest.Show 0 <-- Does not work
End Sub
In Forms.TSGRequest
Private Sub CmdBtnSubmit_Click()
End Sub
Private Sub TSGRequest_Activate()
TxtBxHO = "0800"
TxtBxHC = "1700"
TxtBxTZ = "EDT"
TxtBxTech = "????"
TxtBxPhone = "###.###.####"
TxtBxSev = "5"
TxtBxReason = "Center is having difficulty meeting volume"
TxtBxDate = Date + 1
TxtBxIssue = "Hard drive swap and minor configuration"
End Sub
Private Sub CmdBtnClear_Click()
TxtBxHO = ""
TxtBxHC = ""
TxtBxTZ = ""
TxtBxTech = ""
TxtBxPhone = ""
TxtBxSev = ""
TxtBxReason = ""
TxtBxDate = ""
TxtBxIssue = ""
End Sub
Main Difficulty:
UserForm does not autoopen when template is loaded
Filename TSGDispatch.oft
Private Sub CmdBtnSubmit_Click()
Need to put something here to establish subject line such as "Dispatch
center <TxtBxCenter>"
Enter Message Boday <see sample completed e-mail above>
Close TSGRequest.form
End Sub
Tons of thanks in advance. I know this can be done as I have it working in
Excel and Word, jusr cannot figure out the commands for Outlook.
Jason
have it auto open a UserForm to populate then have a subject and message body
creaded from information entered in the UserForm.
Problem: Have a standard template where the To: and CC: field are
semi-permanent (i.e will only change if someone leave the company, but needs
to be changed at template level rather than in VB). The data in the message
body is volitile but is consistantly the same type of information in the same
format...see below. Need to have a easy way to input this information into
the e-mail and then allow changes before send.
Main problem is I do not know and can not understand the object names in
Outlook
Sample completed e-mail:
Please dispatch Tech to center <TxtBxCenter> to complete <TxtBxIssue>
Technician must call <TxtBxTech> at <TxtBxPhone> after equipment is
installed, for further instructions.
Please dispatch at Severity <TxtBxSev>. <TxtBxReason>.
Equipment will arrive <TxtBxDate> by 10:30 <TxtBxTZ>
Center is open from <TxtBxHO> to <TxtBxHC> <TxtBxTZ>
Sample Code so far:
In Microsoft Outlook Object.This Outlook Session
Private Sub ThisOutlookSession_Open()
TSGRequest.Show 0 <-- Does not work
End Sub
In Forms.TSGRequest
Private Sub CmdBtnSubmit_Click()
End Sub
Private Sub TSGRequest_Activate()
TxtBxHO = "0800"
TxtBxHC = "1700"
TxtBxTZ = "EDT"
TxtBxTech = "????"
TxtBxPhone = "###.###.####"
TxtBxSev = "5"
TxtBxReason = "Center is having difficulty meeting volume"
TxtBxDate = Date + 1
TxtBxIssue = "Hard drive swap and minor configuration"
End Sub
Private Sub CmdBtnClear_Click()
TxtBxHO = ""
TxtBxHC = ""
TxtBxTZ = ""
TxtBxTech = ""
TxtBxPhone = ""
TxtBxSev = ""
TxtBxReason = ""
TxtBxDate = ""
TxtBxIssue = ""
End Sub
Main Difficulty:
UserForm does not autoopen when template is loaded
Filename TSGDispatch.oft
Private Sub CmdBtnSubmit_Click()
Need to put something here to establish subject line such as "Dispatch
center <TxtBxCenter>"
Enter Message Boday <see sample completed e-mail above>
Close TSGRequest.form
End Sub
Tons of thanks in advance. I know this can be done as I have it working in
Excel and Word, jusr cannot figure out the commands for Outlook.
Jason