關鍵功能
- 批量收郵件及打印
- 批量發送郵件及有關 I / O 問題
- 網頁操作
Reference
Excel+VBA常用功能(三):批量发送邮件 - 黄晨的文章 - 知乎
使用Excel+VBA对网页进行操作 - 黄晨的文章 - 知乎
Excel Home 論壇
With CreateObject("internetexplorer.application")
.Visible = True
.Navigate "https://www.baidu.com/s?wd=扯乎"
'关闭网页
' .Quit
End With
P01) 保存outlook里email的附件
Private Sub CommandButton1_Click()
On Error Resume Next
Dim myolapp As New Outlook.Application
Set fs = CreateObject("Scripting.FileSystemObject")
If Not fs.FolderExists("c:\µÁ◊”” º˛") Then fs.CreateFolder ("c:\µÁ◊”” º˛")
Set myNameSpace = myolapp.GetNamespace("MAPI")
Set myfolder = myNameSpace.GetDefaultFolder(olFolderInbox)
For i = 1 To myfolder.Items.Count
Set mymailitem = myfolder.Items(i)
With mymailitem
Set myAttachments = mymailitem.Attachments
para = myAttachments.Item(1).DisplayName
myAttachments.Item(1).SaveAsFile "c:\µÁ◊”” º˛\" + IIf(IsNull(myAttachments.Item(1).DisplayName), i, myAttachments.Item(1).DisplayName)
End With
Next
MsgBox "±æ≥ÖÚ÷¥––Õͱœ£°«ÎµΩƒø¬º÷–≤Ïø¥∏Ωº˛±£¥Ê«Èøˆ°£", vbDefaultButton1, "Loadhigh”—«È÷–—"
UserForm1.Hide
End Sub