问题描述
亲爱的兄弟
我的Outlook中每天收到一封附有电子邮件的电子邮件
i have an emails received in daily in my outlook with attached sheets
//电子邮件的名称:已分配来自ahmed ibrahem
// name of email : allocated from ahmed ibrahem
//附加名称:从(日期)艾哈迈德分配
// name of attached : allocated from ahmed in ( date )
i想运行一个宏来打开这个特定的电子邮件来运行另一个宏我有它
i want to run a macro to open this specific email to run another macro i have it
问题是如何搜索这个特定的电子邮件并在后台打开全部
the problem is how to search about this specific email and open it all in background
感谢您的帮助
推荐答案
>>我想运行一个宏来打开这个特定的电子邮件来运行我拥有它的另一个宏。
>> I want to run a macro to open this specific email to run another macro i have it.
根据我的搜索,在excel中调用outlook宏时你会收到一个错误。
According to my search, when calling outlook macro in excel you will get an error.
如需了解更多信息,请查看以下链接:
For more information, please review the following link:
>>问题是如何搜索此特定电子邮件并在后台打开。
>> the problem is how to search about this specific email and open it all in background.
要在Outlook中搜索电子邮件,请尝试以下代码:
To search an email in outlook, please try the code as below:
Sub SearchMe()
Dim outlookApp
Dim olNs As Outlook.Namespace
Dim Fldr As Outlook.MAPIFolder
Dim olMail As Variant
Dim myTasks
Dim sir() As String
'Set outlookApp = New Outlook.Application
Set outlookApp = CreateObject("Outlook.Application")
Set olNs = outlookApp.GetNamespace("MAPI")
Set Fldr = olNs.GetDefaultFolder(olFolderInbox)
Set myTasks = Fldr.Items
'
'Set olMail = myTasks.Find("[Subject] = ""123456""")
'
For Each olMail In myTasks
'Please change "My-Text-to-Search" to some string you have in your email
If (InStr(1, olMail.Body, "My-Text-to-Search", vbTextCompare) > 0) Then
olMail.Display
Exit For
End If
Next
End Sub
要打开它,您应首先保存Outlook附件。
To open it you should save the outlook attachment first.
如果不保存Outlook附件,则无法打开它。
It is not possible to open an Outlook attachment without saving it.
如需了解更多信息,请查看以下链接:
For more information, please review the following link:
希望它可以帮到你。
最诚挚的问候,
Yuki
这篇关于如何通过excel vba打开Outlook附加的Excel特定Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!