⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmfax.frm

📁 使用Outlook/Microsoft发送传真。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmFax 
   Caption         =   "Send Fax"
   ClientHeight    =   1230
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4095
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   1230
   ScaleWidth      =   4095
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Send Fax"
      Default         =   -1  'True
      Height          =   345
      Left            =   105
      TabIndex        =   0
      Top             =   150
      Width           =   1185
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   4080
      Y1              =   735
      Y2              =   735
   End
   Begin VB.Label Label2 
      Caption         =   "e-mail:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   270
      Left            =   135
      TabIndex        =   2
      Top             =   825
      Width           =   900
   End
   Begin VB.Label Label1 
      Caption         =   "srigangavarapu@yahoo.com"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   270
      Left            =   1080
      MousePointer    =   10  'Up Arrow
      TabIndex        =   1
      ToolTipText     =   "srigangavarapu@yahoo.com"
      Top             =   825
      Width           =   2715
   End
End
Attribute VB_Name = "frmFax"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'LOOKING FOR HOW TO SEND A FAX.
'
'!!!!!!!!!!!!!GREAT!!!!!!!!!!!!!!
'
'---------HERE IT IS-----------
'
'After a long search on this application
'i found a simple solution
'No third party controls required.
'
'
'
'What all you require on the system installed are
'1. Microsoft Fax (from \tools\oldwin95 folder on Win98 CD.)
'2. Microsoft Outlook. (not Outlook Express)
'and
'3. Add the Outlook 8.0 object library in the project references.
'
'To see how it happens?
'Open Outlook and minimize it before you run this app.
'
'####################################################
'If you found this code helpful feel free to use it.
'Also let me know. I will feel happy.
'
'srigangavarapu@yahoo.com
'####################################################

Dim objOutlook As New Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim TelNo As String

Private Sub Command1_Click()
TelNo = "223344" '*** You can use any intl format also
'Create a mail item.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
    With objOutlookMsg
        .To = "[Fax:" & TelNo & "]"
        .Subject = "Automated System Reports."
        .Body = "To Mr. XYZ" & Chr(10) & " This is an Automated Transmission from the computer." & Chr(10) & "Send Fax Completed." & Chr(10) & "------ End of Doc ------"
        .Importance = olImportanceHigh
        .Attachments.Add ("C:\windows\win.ini") 'Pathname+filename with ext
        .Send
    End With
Set objOutlookMsg = Nothing

End Sub


Private Sub Form_Unload(Cancel As Integer)
Set objOutlook = Nothing
End Sub

Private Sub Label1_Click()
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
    With objOutlookMsg
        .To = Label1.Caption
        .Subject = "Fax Application Project"
        .Body = "Mr.San" & Chr(10)
        .Importance = olImportanceHigh
        .Send
    End With
Set objOutlookMsg = Nothing
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -