Gå til hovedindhold

Hvordan gemmes vedhæftede filer, når du besvarer i Outlook?

Forfatter: Kelly Sidst ændret: 2020-05-21

Når vi videresender en e-mail-meddelelse i Microsoft Outlook, forbliver originale vedhæftede filer i denne e-mail-meddelelse i den videresendte besked. Når vi svarer på en e-mail-besked, vedhæftes de originale vedhæftede filer imidlertid ikke i den nye svarmeddelelse. Her vil vi introducere et par tricks til at beholde originale vedhæftede filer, når du svarer i Microsoft Outlook.

Svar med vedhæftede filer ved manuelt at kopiere og indsætte
Svar automatisk med vedhæftede filer fra VBA
Et klik for at svare med vedhæftede filer med Kutools til Outlook


Svar med vedhæftede filer ved manuelt at kopiere og indsætte

Vi kan manuelt kopiere originale vedhæftede filer i en e-mail-besked og indsætte dem i vinduet Svarbesked, når vi svarer e-mail-beskeden senere.

Trin 1: Klik på e-mail-beskeden for at få vist den i læseruden.

Trin 2: Højreklik på en vedhæftet fil i forhåndsvisning af e-mail-beskeden, og vælg Marker alt fra højreklikmenuen.

Trin 3: Højreklik på de valgte vedhæftede filer, og vælg Kopi fra højreklikmenuen.

Trin 4: Besvar e-mail-beskeden ved at klikke på Svar knappen på Home fanen (eller på værktøjslinjen i Outlook 2007).

Trin 5: I vinduet Besvarelse af besked skal du klikke på pasta knappen på Besked fanen for at indsætte disse vedhæftede filer.

Hvis du bruger Outlook 2013 eller den nyere version, skal du klikke på Pop ud i øverste venstre hjørne af læseruden for at frigive vinduet Svar. Klik for at vide mere ...

Trin 6: Skriv den besvarende besked, og klik på Send .


Svar let på e-mail med originale vedhæftede filer i Outlook:

Kutools til Outlook's Svar med vedhæftet fil hjælpeprogram kan hjælpe dig med let at besvare en modtaget e-mail med de originale vedhæftede filer i Outlook. Se nedenstående demo: 
Download og prøv det nu! (60-dages gratis spor)


Svar automatisk med vedhæftede filer fra VBA 

Der er en VBA-makro, der kan hjælpe dig med at svare automatisk med originale vedhæftede filer.

Bemærk: Før du kører VBA-makroer, skal du aktivere makroer i Microsoft Outlook.

Trin 1: Vælg den e-mail-besked, du vil svare med dens vedhæftede filer.

Trin 2: Tryk på andre + F11 taster for at åbne vinduet Microsoft Visual Basic for Applications.

Trin 3: Udvid Project1 og Microsoft Outlook-objekter i venstre bjælke, og dobbeltklik på Denne OutlookSession at åbne den.

Trin 4: Indsæt følgende kode i vinduet ThisOutlookSession.

Sub RunReplyWithAttachments()
'Update by Extendoffice 20180830
    Dim xReplyItem As Outlook.MailItem
    Dim xItem As Object
    On Error Resume Next
    Set xItem = GetCurrentItem()
    If xItem Is Nothing Then Exit Sub
    Set xReplyItem = xItem.Reply
    CopyAttachments xItem, xReplyItem
    xReplyItem.Display
    Set xReplyItem = Nothing
    Set xItem = Nothing
End Sub
Sub RunReplyAllWithAttachments()
    Dim xReplyAllItem As Outlook.MailItem
    Dim xItem As Object
    Set xItem = GetCurrentItem()
    If xItem Is Nothing Then Exit Sub
    Set xReplyAllItem = xItem.ReplyAll
    CopyAttachments xItem, xReplyAllItem
    xReplyAllItem.Display
    Set xReplyAllItem = Nothing
    Set xItem = Nothing
End Sub
    
Function GetCurrentItem() As Object
    On Error Resume Next
    Select Case TypeName(Application.ActiveWindow)
        Case "Explorer"
            Set GetCurrentItem = Application.ActiveExplorer.Selection.Item(1)
        Case "Inspector"
            Set GetCurrentItem = Application.ActiveInspector.currentItem
    End Select
End Function
    
Sub CopyAttachments(SourceItem As MailItem, TargetItem As MailItem)
    Dim xFilePath As String
    Dim xAttachment As Attachment
    Dim xFSO As Scripting.FileSystemObject
    Dim xTmpFolder As Scripting.Folder
    Dim xFldPath As String
    Set xFSO = New Scripting.FileSystemObject
    Set xTmpFolder = xFSO.GetSpecialFolder(2)
    xFldPath = xTmpFolder.Path & "\"
    For Each xAttachment In SourceItem.Attachments
        If IsEmbeddedAttachment(xAttachment) = False Then
            xFilePath = xFldPath & xAttachment.Filename
            xAttachment.SaveAsFile xFilePath
            TargetItem.Attachments.Add xFilePath, , , xAttachment.DisplayName
            xFSO.DeleteFile xFilePath
        End If
    Next
    Set xFSO = Nothing
    Set xTmpFolder = 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

Trin 5: Tryk på F5 nøgle til at køre denne makro. I åbningen Makroer dialogboksen, klik RunReplyAllWithAttachments hvis du vil svare alle med vedhæftede filer. Ellers skal du vælge RunReplyWith Attachments, klik derefter på Kør .

Derefter åbnes vinduet Besvarelsesbesked med vedhæftning af alle originale vedhæftede filer.

Trin 6: Skriv den besvarende besked, og klik Send .


Svar automatisk med vedhæftede filer med Kutools til Outlook

Svar med vedhæft nytte af Kutools til Outlook kan hjælpe dig med at besvare e-mails med originale vedhæftede filer med et enkelt klik.

Kutools til Outlook : med mere end 100 + praktiske Outlook-tilføjelsesprogrammer, gratis at prøve uden begrænsning på 60 dage.

1. Vælg e-mailen indeholder de vedhæftede filer, du skal svare med.

2. Klik derefter på Kutools > Svar med vedhæftet fil > Svar med vedhæftet fil. Se skærmbillede:

Derefter vises alle vedhæftede filer i den valgte e-mail i Vedhæftet felt i svarmeddelelsen. Skriv din e-mail og send den.

Hvis du vil have en gratis prøveversion af dette værktøj, skal du gå til download softwaren gratis først, og gå derefter til for at anvende handlingen i henhold til ovenstående trin.


Et klik for at svare med vedhæftede filer med Kutools til Outlook

  Hvis du vil have en gratis prøveperiode (60 dage) af dette værktøj, klik for at downloade det, og gå derefter til at anvende handlingen i henhold til ovenstående trin.


Relaterede artikler:


Bedste kontorproduktivitetsværktøjer

Kutools til Outlook - Over 100 kraftfulde funktioner til at superlade din Outlook

🤖 AI Mail Assistant: Øjeblikkelige pro-e-mails med AI-magi – et klik for geniale svar, perfekt tone, flersproget beherskelse. Forvandl e-mailing ubesværet! ...

📧 Email Automation: Ikke til stede (tilgængelig til POP og IMAP)  /  Planlæg Send e-mails  /  Auto CC/BCC efter regler ved afsendelse af e-mail  /  Automatisk videresendelse (avancerede regler)   /  Tilføj automatisk hilsen   /  Opdel automatisk e-mails med flere modtagere i individuelle meddelelser ...

📨 Email Management: Genkald nemt e-mails  /  Bloker svindel-e-mails af emner og andre  /  Slet duplikerede e-mails  /  Avanceret søgning  /  Konsolider mapper ...

📁 Vedhæftede filer ProBatch Gem  /  Batch adskilles  /  Batch komprimere  /  Automatisk gem   /  Automatisk afmontering  /  Automatisk komprimering ...

🌟 Interface Magic: 😊 Flere smukke og seje emojis   /  Boost din Outlook-produktivitet med fanebaserede visninger  /  Minimer Outlook i stedet for at lukke ...

👍 Wonders med et enkelt klik: Besvar alle med indgående vedhæftede filer  /   Anti-phishing e-mails  /  🕘Vis afsenderens tidszone ...

👩🏼‍🤝‍👩🏻 Kontakter og kalender: Batch Tilføj kontakter fra udvalgte e-mails  /  Opdel en kontaktgruppe til individuelle grupper  /  Fjern fødselsdagspåmindelser ...

Over 100 Features Afvent din udforskning! Klik her for at finde mere.

Læs mere       Gratis download      Køb
 

 

Comments (26)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Ciao, la macro funziona. Peccato che risponde solo al mittente, allegando gli allegati, e non a tutte le persone presenti in una mail. come si potrebbe modificare per aggiungere questa seconda funzione?

grazie mille
This comment was minimized by the moderator on the site
Buna ziua!

Exista posibilitatea de a da reply all la un email care are persoane in bcc?

Multumesc!
This comment was minimized by the moderator on the site
Hi, I am using your code for reply which is great, thank you form making it available.I have my mail options set to preface comments with my initials which works when I use the standard reply. When I create a reply using this code my intials are not inserted Can you assist please?ThanksSteve
This comment was minimized by the moderator on the site
Hi
I am going to use the code to reply all with attachments in search results from All Mailboxes but it shows me an error and does not work.
please let me know how to change the code to be usable for All Mailboxes.

Best regards
Shahrooz
This comment was minimized by the moderator on the site
Hi,
The error does not cause by the search.
To avoid the error, please click Tools > References to open the References dialog, and then enable the Microsoft Scripting Runtime option. See the attached image for the steps.
This comment was minimized by the moderator on the site
Hi!

Thanks a lot for such a great tool!

Can the command be ran so that the reply window won't pop-up but stay in reading pane view?
This comment was minimized by the moderator on the site
Hi Alexey,
We have released a new version with the tool updated. Thank you for your support.
This comment was minimized by the moderator on the site
Hi Crystal!

thanks for update!
had the macro code changed or it would work only with tool installed?
This comment was minimized by the moderator on the site
Hi Alexey,
The code is used alone without the tool installed.
This comment was minimized by the moderator on the site
Very nice, thanks, but I have compiler error: User-defined type not defined. There is highlighted Dim xFSO As Scripting.FileSystemObject in part Sub CopyAttachments
This comment was minimized by the moderator on the site
Hi Honza,
The code works well in my case. Which Office version do you use?
This comment was minimized by the moderator on the site
me too. I have the problem with the same people above. I use Office 2016.
This comment was minimized by the moderator on the site
I am using office 365 with the same error
This comment was minimized by the moderator on the site
Hi Bob,
Please try:
1. Press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window again;
2. Click Tools > References, and check the Microsoft Scripting Runtime box.
Now the code can work.
This comment was minimized by the moderator on the site
That solve it for me!

Thanks.
This comment was minimized by the moderator on the site
I used VBA code but it attaches with all image (.gif, jpg,...) in email content. Pls show me how to solve this problem?
This comment was minimized by the moderator on the site
Good Day,
The code is updated in the post. The problen now is solved. Please have a try and thanks for your comment.
This comment was minimized by the moderator on the site
In the last part of the script, many of the variables are not defined.
This comment was minimized by the moderator on the site
I have downloaded the Kutools tab. Can I add the 'Reply with Attachment' to my home tab or to Quick Steps??
This comment was minimized by the moderator on the site
Dear Jim,
You can right click the Reply with Attachment button, and select the "Add to Quick Access Toolbar" to add this function to the Quick Access Toolbar on the Ribbon. See screenshot:
This comment was minimized by the moderator on the site
I am trying to use the Reply with Attachments but it isn't adding the attachment, just keeping the link. I use the automatic detach when email is received. Is there a configuration setting that I need to update? Thank you for your help!
This comment was minimized by the moderator on the site
Dear Susan,

The attachments won't locate in the email any more as they are detached automatically from the email. Please turn off the auto detach feature for the sake of using this Reply with Attachment feature.

Best Regards, Crystal.
This comment was minimized by the moderator on the site
how do you turn off the auto detach feature
This comment was minimized by the moderator on the site
Dear Dakota,

If you are using the Auto detach all receiving attachments feature of Kutools for Outlook, please do as below screenshot shown to turn off this feature by unchecking it in your Outlook. Thank you!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations