Note: The other languages of the website are Google-translated. Back to English
Mewngofnodi  \/ 
x
or
x
Cofrestru  \/ 
x

or

Sut i ateb pob un gydag atodiadau gwreiddiol yn Outlook?

Fel rheol, pan ddefnyddiwch y swyddogaeth Ateb Pawb i ateb y neges i'r holl dderbynwyr yn Outlook, collir yr atodiadau gwreiddiol yn awtomatig. A yw'n bosibl atodi atodiadau gwreiddiol wrth ateb pawb yn Outlook?

Atebwch bob un gydag atodiadau gwreiddiol gyda chod VBA

Atebwch bob un gydag atodiadau gwreiddiol gyda Kutools ar gyfer Outlook


Atebwch bob un gydag atodiadau gwreiddiol gyda chod VBA

Nid oes unrhyw nodwedd uniongyrchol i ddelio â'r dasg hon yn Outlook, ond, gallwch gymhwyso'r cod VBA canlynol i'w gyflawni. Gwnewch y camau isod: Os gwelwch yn dda:

1. Lansio'r Rhagolwg, ac yna dal i lawr y ALT + F11 allweddi i agor y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.

2. Yn y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr, cliciwch ddwywaith ThisOutlookSession oddi wrth y Prosiect1 (VbaProject.OTM) cwarel i agor y modd, ac yna copïo a gludo'r cod canlynol i'r modiwl gwag.

Cod VBA: Atebwch bob un ag ahhachments gwreiddiol:

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

doc ateb i gyd gydag atodiad 1

3. Ac yna cliciwch offer > cyfeiriadau yn y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr, yn y popped allan Cyfeiriadau-Prosiect1 blwch deialog, gwirio Microsoft Scripting Runtime opsiwn gan y Cyfeiriadau sydd ar Gael blwch rhestr, gweler y screenshot:

doc ateb i gyd gydag atodiad 9

4. Yna arbedwch a chau ffenestr y cod, ac yna gallwch chi ychwanegu'r botwm macro i mewn i'r Bar Offer Mynediad Cyflym.

5. Agorwch yr e-bost rydych chi am ei ateb i gyd gydag atodiad ynddo Neges ffenestr, yna dewiswch Mwy o Orchmynion oddi wrth y Addasu Bar Offer Mynediad Cyflym gwympo, gweler y screenshot:

doc ateb i gyd gydag atodiad 2

6. Yn y Dewisiadau Outlook blwch deialog, gwnewch y gweithrediadau canlynol:

(1.) Dewis Macros oddi wrth y Dewiswch orchmynion oddi wrth rhestr ostwng;

(2.) Cliciwch yr enw macro rydych wedi'i fewnosod dim ond nawr;

(3.) Ac yna cliciwch Ychwanegu botwm i ychwanegu'r macro i mewn i'r Addasu Bar Offer Mynediad Cyflym.

doc ateb i gyd gydag atodiad 3

7. Yna cliciwch OK i gau'r blwch deialog, nawr, mae'r botwm macro wedi'i fewnosod yn y Bar Offer Mynediad Cyflym, gweler y screenshot:

doc ateb i gyd gydag atodiad 4

8. Nawr, cliciwch y botwm macro, ac mae'r ffenestr ateb ateb gydag atodiadau gwreiddiol yn cael ei hagor, yna cyfansoddi'r neges ateb, a chlicio anfon botwm, gweler y screenshot:

doc ateb i gyd gydag atodiad 5


Atebwch bob un gydag atodiadau gwreiddiol gyda Kutools ar gyfer Outlook

Os oes gennych Kutools ar gyfer Rhagolwg, Gyda'i Ateb Pawb gydag Atodiad nodwedd, gallwch ateb pob un gydag atodiadau dim ond un clic.

Kutools ar gyfer Rhagolwg : gyda mwy na 100 o ychwanegiadau defnyddiol Outlook, yn rhad ac am ddim i geisio heb unrhyw gyfyngiad mewn 60 diwrnod. 

Ar ôl gosod Kutools ar gyfer Rhagolwg, gwnewch fel hyn:

1. Dewiswch y neges eich bod am ateb pob un gydag atodiadau, ac yna cliciwch Kutools > Ymateb gydag Atodiad > Ateb Pawb gydag Atodiad, gweler y screenshot:

2. Ac mae'r ffenestr neges ateb yn cael ei hagor gydag atodiadau gwreiddiol, yna cyfansoddi'ch neges a'i hanfon, gweler y screenshot:

doc ateb i gyd gydag atodiad 7

Cliciwch i lawrlwytho Kutools ar gyfer Outlook a threial am ddim nawr!


Kutools for Outlook - Yn Dod â 100 o Nodweddion Uwch i'w Rhagweld, a Gwneud Gwaith yn Haws Osgach!

  • Auto CC / BCC yn ôl rheolau wrth anfon e-bost; Auto Ymlaen E-byst Lluosog yn ôl arfer; Ymateb Auto heb weinydd cyfnewid, a nodweddion mwy awtomatig ...
  • Rhybudd BCC - dangoswch neges pan geisiwch ateb popeth os yw'ch cyfeiriad post yn rhestr BCC; Atgoffwch Wrth Ymlyniadau ar Goll, a mwy o nodweddion atgoffa ...
  • Ymateb (Pawb) Gyda'r Holl Atodiadau yn y sgwrs bost; Ateb Llawer o E-byst mewn eiliadau; Auto Ychwanegu Cyfarchiad wrth ateb; Ychwanegu Dyddiad i'r pwnc ...
  • Offer Ymlyniad: Rheoli Pob Atodiad ym mhob Post, Datgysylltiad Auto, Cywasgu Pawb, Ail-enwi Pawb, Arbed Pawb ... Adroddiad Cyflym, Cyfrif Postiau Dethol...
  • E-byst Sothach Pwerus yn ôl arfer; Tynnwch y Post a Chysylltiadau Dyblyg... Yn eich galluogi i wneud yn ddoethach, yn gyflymach ac yn well yn Outlook.
tab kutools rhagweld kutools tab 1180x121
kutools rhagweld rhagolygon kutools ynghyd â thab 1180x121
 
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Corinne · 17 days ago
    Bonjour
    Cette macros est super malheureusement cela ne fonctionne qu'une fois.. dommage
  • To post as a guest, your comment is unpublished.
    dimscr · 1 months ago
    is there a macro that replies to all keeps attachments and keeps the original email in text format?
  • To post as a guest, your comment is unpublished.
    Pierre · 2 months ago
    Thank you very much, you are the only one to share this macro and it's awesome, thank you for your work !
  • To post as a guest, your comment is unpublished.
    marco pereira · 2 years ago
    a macro VBA só funciona por um dia?
  • To post as a guest, your comment is unpublished.
    Harivola · 2 years ago
    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
  • To post as a guest, your comment is unpublished.
    ugurk · 3 years ago
    All files in mail adding as attachment such as image in my signiture.
    How can i only attachment files
    • To post as a guest, your comment is unpublished.
      skyyang · 3 years ago
      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
      • To post as a guest, your comment is unpublished.
        apprentice · 1 years ago
        I signed up just to say thank you! Skyyang.
      • To post as a guest, your comment is unpublished.
        ugurk · 3 years ago
        Thanks alot
  • To post as a guest, your comment is unpublished.
    Sam · 3 years ago
    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.
    • To post as a guest, your comment is unpublished.
      skyyang · 3 years ago
      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.
      • To post as a guest, your comment is unpublished.
        sam · 2 years ago
        Thank you so much skyyang!!

        Works like a charm.

        Best Regards