home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = " "
- ClientHeight = 3285
- ClientLeft = 1095
- ClientTop = 1500
- ClientWidth = 5520
- Height = 3690
- Left = 1035
- LinkTopic = "Form1"
- ScaleHeight = 3285
- ScaleWidth = 5520
- Top = 1155
- Width = 5640
- Begin VB.TextBox Text2
- Height = 2115
- Left = 1440
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 6
- Text = "vbu2504.frx":0000
- Top = 540
- Width = 3915
- End
- Begin VB.TextBox Text1
- Height = 300
- Left = 1440
- TabIndex = 3
- Text = "Text1"
- Top = 120
- Width = 3915
- End
- Begin VB.CommandButton Command1
- Caption = "E&xit"
- Height = 300
- Index = 2
- Left = 4200
- TabIndex = 2
- Top = 2820
- Width = 1200
- End
- Begin VB.CommandButton Command1
- Caption = "&Cancel"
- Height = 300
- Index = 1
- Left = 2820
- TabIndex = 1
- Top = 2820
- Width = 1200
- End
- Begin VB.CommandButton Command1
- Caption = "&Send"
- Height = 300
- Index = 0
- Left = 1440
- TabIndex = 0
- Top = 2820
- Width = 1200
- End
- Begin MSMAPI.MAPIMessages MAPIMessages1
- Left = 240
- Top = 1800
- _Version = 65536
- _ExtentX = 741
- _ExtentY = 741
- _StockProps = 0
- End
- Begin MSMAPI.MAPISession MAPISession1
- Left = 240
- Top = 1140
- _Version = 65536
- _ExtentX = 741
- _ExtentY = 741
- _StockProps = 0
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- Caption = "Problem:"
- Height = 300
- Left = 120
- TabIndex = 5
- Top = 540
- Width = 1200
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "Customer:"
- Height = 300
- Left = 120
- TabIndex = 4
- Top = 120
- Width = 1200
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Command1_Click(Index As Integer)
- '
- ' handle user clicks
- '
- Select Case Index
- Case 0
- ' send out report
- DoMAPISend
- ClearForm
- Case 1
- ' cancel this report
- ClearForm
- Case 2
- ' exit this program
- Unload Me
- End Select
- '
- End Sub
- Private Sub Form_Load()
- DoMAPILogOn
- ClearForm
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- DoMAPILogOff
- End Sub
- Public Sub ClearForm()
- '
- ' clear this form for next input
- '
- Text1 = ""
- Text2 = ""
- End Sub
- Public Sub DoMAPILogOn()
- '
- ' attempt to log on to mail services
- '
- On Error GoTo DoMAPILogOnErr
- '
- MAPISession1.DownloadMail = False
- MAPISession1.UserName = "MS-Mail Only"
- MAPISession1.SignOn
- MAPIMessages1.SessionID = MAPISession1.SessionID
- Exit Sub
- '
- DoMAPILogOnErr:
- MsgBox Error$, vbCritical, "Error Code: " + Str(Err) + " [DoMAPILogOn]"
- Unload Me
- End
- End Sub
- Public Sub DoMAPILogOff()
- '
- ' log off mapi services
- '
- On Error Resume Next
- MAPISession1.SignOff
- '
- End Sub
- Public Sub DoMAPISend()
- '
- ' put together message and
- ' ship it out
- '
- On Error GoTo DoMAPISendErr
- '
- MAPIMessages1.Compose
- MAPIMessages1.MsgSubject = "Trouble Report for " + Me.Text1
- MAPIMessages1.MsgNoteText = Me.Text2
- MAPIMessages1.RecipAddress = "MS:COMTRAX/PO1/mca"
- MAPIMessages1.Send
- '
- Exit Sub
- '
- DoMAPISendErr:
- MsgBox Error$, vbCritical, "Error Code: " + Str(Err) + " [DoMAPISend]"
- Exit Sub
- End Sub
-