Skip to main content

Conas gach ceann a fhreagairt le ceangaltáin bhunaidh in Outlook?

De ghnáth, nuair a chuireann tú an fheidhm Freagra Uile i bhfeidhm chun an teachtaireacht a fhreagairt do gach faighteoir in Outlook, caillfear na ceangaltáin bhunaidh go huathoibríoch. An féidir ceangaltáin bhunaidh a cheangal nuair a thugtar freagra ar gach ceann in Outlook?

Freagair gach ceann acu le ceangaltáin bhunaidh le cód VBA

Freagair gach ceann acu le ceangaltáin bhunaidh le Kutools for Outlook


Freagair gach ceann acu le ceangaltáin bhunaidh le cód VBA

Níl aon ghné dhíreach ann chun déileáil leis an tasc seo in Outlook, ach, is féidir leat an cód VBA seo a leanas a chur i bhfeidhm chun é a bhaint amach. Déan na céimeanna thíos le do thoil:

1. Seoladh an Outlook, agus ansin coinnigh síos an ALT + F11 eochracha a oscailt Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

2. Sa an Microsoft Visual Basic d’Fheidhmchláir fuinneog, cliceáil dúbailte ThisOutlookSession ó na Tionscadal1 (VbaProject.OTM) pána chun an modh a oscailt, agus ansin an cód seo a leanas a chóipeáil agus a ghreamú isteach sa mhodúl bán.

Cód VBA: Freagair gach ceann acu le hailtirí bunaidh:

Sub ReplyAllWithAttachments()
'Updateby Extendoffice
Dim xItem As Object
On Error Resume Next
Select Case TypeName(Outlook.Application.ActiveWindow)
Case "Explorer"
For Each xItem In Outlook.Application.ActiveExplorer.Selection
GetReplyItem xItem
Next
Case "Inspector"
Set xItem = Outlook.Application.ActiveInspector.CurrentItem
GetReplyItem xItem
End Select
Set xItem = Nothing
End Sub
Sub GetReplyItem(Item As Object)
Dim xReplyMailItem As Outlook.MailItem
On Error Resume Next
If Not Item Is Nothing Then
Set xReplyMailItem = Item.ReplyAll
GetAttachments Item, xReplyMailItem
xReplyMailItem.Display
'xReplyMailItem.Send
Item.UnRead = False
End If
Set xReplyMailItem = Nothing
End Sub
Sub GetAttachments(xSourceItem, xTargetItem)
Dim xFSO As Scripting.FileSystemObject
Dim xTmpPath As String
Dim xAttachment As Attachment
Dim xTmpFile As String
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
xTmpPath = CreateObject("shell.Application").NameSpace(5).self.Path & "\TmpAttachments\"
If xFSO.FolderExists(xTmpPath) = False Then
MkDir xTmpPath
End If
For Each xAttachment In xSourceItem.Attachments
If IsEmbeddedAttachment(xAttachment) = False Then
xTmpFile = xTmpPath & xAttachment.FileName
xAttachment.SaveAsFile xTmpFile
xTargetItem.Attachments.Add xTmpFile, , , xAttachment.DisplayName
xFSO.DeleteFile xTmpFile
End If
Next
If xFSO.FolderExists(xTmpPath) Then
Kill xTmpPath
End If
Set xFSO = Nothing
End Sub
Function IsEmbeddedAttachment(Attach As Attachment)
Dim xAttParent As Object
Dim xCID As String, xID As String
Dim xHTML As String
On Error Resume Next
Set xAttParent = Attach.Parent
xCID = ""
xCID = Attach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F")
If xCID <> "" Then
xHTML = xAttParent.HTMLBody
xID = "cid:" & xCID
If InStr(xHTML, xID) > 0 Then
IsEmbeddedAttachment = True
Else
IsEmbeddedAttachment = False
End If
End If
End Function

freagra doc go léir le ceangaltán 1

3. Agus ansin cliceáil uirlisí > tagairtí sa Microsoft Visual Basic d’Fheidhmchláir fhuinneog, sa popped amach Tagairtí-Tionscadal1 bosca dialóige, seiceáil Microsoft Scripting Runtime rogha ón Tagairtí atá ar Fáil bosca liosta, féach an scáileán:

freagra doc go léir le ceangaltán 9

4. Ansin sábháil agus dún an fhuinneog cód, agus ansin is féidir leat an cnaipe macra a chur isteach sa Barra Uirlisí Rochtana Tapa.

5. Oscail an ríomhphost ar mhaith leat freagra a thabhairt air go léir le ceangaltán ann Teachtaireacht fuinneog, ansin roghnaigh Tuilleadh Orduithe ó na Saincheap Barra Uirlisí Rochtana Tapa titim anuas, féach ar an scáileán:

freagra doc go léir le ceangaltán 2

6. Sa an Roghanna Outlook bosca dialóige, déan na hoibríochtaí seo a leanas:

(1.) Roghnaigh Macraí ó na Roghnaigh orduithe ó liosta anuas;

(2.) Cliceáil an macra-ainm atá curtha isteach agat díreach anois;

(3.) Agus ansin cliceáil Cuir cnaipe chun an macra a chur isteach sa Saincheap Barra Uirlisí Rochtana Tapa.

freagra doc go léir le ceangaltán 3

7. Ansin cliceáil OK chun an bosca dialóige a dhúnadh, anois, tá an cnaipe macra curtha isteach sa Barra Uirlisí Rochtana Tapa, féach ar an scáileán:

freagra doc go léir le ceangaltán 4

8. Anois, cliceáil an macra-chnaipe, agus osclaítear an fhuinneog teachtaireachta freagartha le ceangaltáin bhunaidh, ansin cum an teachtaireacht freagartha, agus cliceáil Seol cnaipe, féach ar an scáileán:

freagra doc go léir le ceangaltán 5


Freagair gach ceann acu le ceangaltáin bhunaidh le Kutools for Outlook

Má tá tú Kutools le haghaidh Outlook, Lena Freagra Gach le Ceangaltán gné, is féidir leat gach ceann a fhreagairt le ceangaltáin ach cliceáil amháin.

Kutools le haghaidh Outlook : le níos mó ná 100 breiseán áisiúil Outlook, saor in aisce le triail gan aon teorannú i gceann 60 lá. 

Tar éis a shuiteáil Kutools le haghaidh Outlook, déan mar seo le do thoil:

1. Roghnaigh an teachtaireacht gur mhaith leat gach ceann a fhreagairt le ceangaltáin, agus ansin cliceáil Kutools > Freagra le Ceangaltán > Freagra Gach le Ceangaltán, féach ar an scáileán:

2. Agus osclaítear fuinneog na teachtaireachta freagartha le ceangaltáin bhunaidh, ansin cum do theachtaireacht agus seol í, féach an scáileán:

freagra doc go léir le ceangaltán 7

Cliceáil chun Kutools a íoslódáil le haghaidh Outlook agus triail saor in aisce anois!


Uirlisí Táirgiúlachta Oifige is Fearr

Kutools le haghaidh Outlook - Níos mó ná 100 Gnéithe cumhachtacha chun do Outlook a shárú

🤖 Cúntóir Ríomhphoist AI: Ríomhphoist pro toirt le draíocht AI - aon-cliceáil chun freagraí genius, ton foirfe, máistreacht ilteangach. Trasfhoirmigh ríomhphost gan stró! ...

📧 Uathoibriú Ríomhphoist: As Oifig (Ar fáil do POP agus IMAP)  /  Sceideal Seol Ríomhphoist  /  Auto CC/BCC de réir Rialacha Agus Ríomhphost á Sheoladh  /  Auto Ar Aghaidh (Ardrialacha)   /  Beannacht Auto Cuir leis   /  Scoilt Ríomhphoist Ilfhaighteoirí go huathoibríoch i dTeachtaireachtaí Aonair ...

📨 Bainistíocht Ríomhphost: Ríomhphoist a Athghairm go héasca  /  Bloc Ríomhphoist Scam ag Ábhair agus Daoine Eile  /  Scrios Ríomhphoist Dúblacha  /  Cuardach Casta  /  Comhdhlúthaigh Fillteáin ...

📁 Ceangaltáin ProSábháil Baisc  /  Baisc Dícheangail  /  Comhbhrú Baisc  /  Auto Sábháil   /  Auto Dícheangail  /  Comhbhrúite Auto ...

🌟 Draíocht Chomhéadain: 😊Níos mó Emojis Pretty and Cool   /  Treisiú Do Tháirgiúlacht Outlook le Radhairc Tabbed  /  Íoslaghdaigh Outlook In ionad Deiridh ...

???? Wonders aon-cliceáil: Freagair Gach Duine le Ceangaltáin Isteach  /   Ríomhphoist Frith-Iascaireachta  /  🕘 Taispeáin Crios Ama an tSeoltóra ...

👩🏼‍🤝‍👩🏻 Teagmhálaithe & Féilire: Baisc Cuir Teagmhálacha Ó Ríomhphoist Roghnaithe  /  Roinn Grúpa Teagmhála ar Ghrúpaí Aonair  /  Bain Meabhrúcháin Breithlá ...

Thar Gnéithe 100 Fan le do Thaiscéalaíocht! Cliceáil Anseo le Tuilleadh Amach.

 

 

Comments (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Is it possible that, after a reboot or windows update, the macro is not working anymore? Also after doing again the procedure is not working anymore
This comment was minimized by the moderator on the site
Bonjour, la macro n'a fonctionné qu'une seule fois, dommage
This comment was minimized by the moderator on the site
Bonjour, nickel, mais n'a fonctionné qu'une fois. dommage
This comment was minimized by the moderator on the site
BonjourCette macros est super malheureusement cela ne fonctionne qu'une fois.. dommage
This comment was minimized by the moderator on the site
is there a macro that replies to all keeps attachments and keeps the original email in text format?
This comment was minimized by the moderator on the site
Thank you very much, you are the only one to share this macro and it's awesome, thank you for your work !
This comment was minimized by the moderator on the site
a macro VBA só funciona por um dia?
This comment was minimized by the moderator on the site
Bonjour,


Super, ça marche à merveille. J'ai visité plein de tuto et d'échange sur le sujet et aucune réponse satisfaisante avant celui-ci. Sachant que jusqu'à présent, je bricolais toujours entre "transférer" et remettre les destinataires ou "répondre à tous" et remettre la ou les pièces jointes. Encore merci.

Harivola
This comment was minimized by the moderator on the site
All files in mail adding as attachment such as image in my signiture.
How can i only attachment files
This comment was minimized by the moderator on the site
Hi,
If you need to exclude the images within the messages which are inserted into the attachments, please apply the below VBA code, hope it can help you!
Sub ReplyAllWithAttachments()
Dim xItem As Object
On Error Resume Next
Select Case TypeName(Outlook.Application.ActiveWindow)
Case "Explorer"
For Each xItem In Outlook.Application.ActiveExplorer.Selection
GetReplyItem xItem
Next
Case "Inspector"
Set xItem = Outlook.Application.ActiveInspector.CurrentItem
GetReplyItem xItem
End Select
Set xItem = Nothing
End Sub
Sub GetReplyItem(Item As Object)
Dim xReplyMailItem As Outlook.MailItem
On Error Resume Next
If Not Item Is Nothing Then
Set xReplyMailItem = Item.ReplyAll
GetAttachments Item, xReplyMailItem
xReplyMailItem.Display
'xReplyMailItem.Send
Item.UnRead = False
End If
Set xReplyMailItem = Nothing
End Sub
Sub GetAttachments(xSourceItem, xTargetItem)
Dim xFSO As Scripting.FileSystemObject
Dim xTmpPath As String
Dim xAttachment As Attachment
Dim xTmpFile As String
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
xTmpPath = CreateObject("shell.Application").NameSpace(5).self.Path & "\TmpAttachments\"
If xFSO.FolderExists(xTmpPath) = False Then
MkDir xTmpPath
End If
For Each xAttachment In xSourceItem.Attachments
If IsEmbeddedAttachment(xAttachment) = False Then
xTmpFile = xTmpPath & xAttachment.FileName
xAttachment.SaveAsFile xTmpFile
xTargetItem.Attachments.Add xTmpFile, , , xAttachment.DisplayName
xFSO.DeleteFile xTmpFile
End If
Next
If xFSO.FolderExists(xTmpPath) Then
Kill xTmpPath
End If
Set xFSO = Nothing
End Sub
Function IsEmbeddedAttachment(Attach As Attachment)
Dim xAttParent As Object
Dim xCID As String, xID As String
Dim xHTML As String
On Error Resume Next
Set xAttParent = Attach.Parent
xCID = ""
xCID = Attach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F")
If xCID <> "" Then
xHTML = xAttParent.HTMLBody
xID = "cid:" & xCID
If InStr(xHTML, xID) > 0 Then
IsEmbeddedAttachment = True
Else
IsEmbeddedAttachment = False
End If
End If
End Function
This comment was minimized by the moderator on the site
I signed up just to say thank you! Skyyang.
This comment was minimized by the moderator on the site
Thanks alot
This comment was minimized by the moderator on the site
Getting compile error as : User-define type not defined at line no " Dim xFSO As Scripting.FileSystemObject" under "Sub GetAttachments(xSourceItem, xTargetItem)"
Kindly Advice on this error.
This comment was minimized by the moderator on the site
Hello, Sam,
Sorry, the article misses the step 3, I have updated this article, please try again. Hope it can help you!

Thank you for your reminder.
This comment was minimized by the moderator on the site
Thank you so much skyyang!!

Works like a charm.

Best Regards
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations