Skip to main content

Conas gach ceangaltán a bhaint de r-phost in Outlook?

Údar: Kelly Athraithe Deiridh: 2020-05-29

De ghnáth nuair a bhíonn tú ag réamhamharc ar r-phost, is féidir leat ceangaltán a scriosadh le cliceáil ar dheis agus an Bain Ceangaltán mír. Uaireanta d’fhéadfadh go mbeadh go leor ceangaltán i dteachtaireacht ríomhphoist, agus beidh sé slachtmhar iad a bhaint ceann ar cheann. Anseo socraímid dhá chleas éasca duit gach ceangaltán a bhaint in aon ríomhphost amháin, agus gach ceangaltán a bhaint ó iliomad ríomhphoist chomh maith in Outlook.

Bain gach ceangaltán de láimh i dteachtaireacht ríomhphoist amháin in Outlook
Bain gach ceangaltán ó iliomad teachtaireachtaí ríomhphoist in Outlook le cód VBA
Bain gach ceangaltán go héasca ó ríomhphost amháin nó níos mó le Kutools for Outlook


Bain gach ceangaltán de láimh i dteachtaireacht ríomhphoist amháin in Outlook

Is furasta gach ceangaltán a bhaint i dteachtaireacht ríomhphoist roghnaithe leis an Bain Ceangaltáin gné in Outlook.

Céim 1: Roghnaigh an teachtaireacht ríomhphoist a mbainfidh tú a ceangaltáin níos déanaí.

Céim 2: Cliceáil ceann de na ceangaltáin sa Phána Léitheoireachta chun na hUirlisí Ceangaltáin a ghníomhachtú.

Céim 3: Cliceáil ar an Roghnaigh Uile cnaipe sa Roghnú grúpa ar an Ceangaltáin Tab.

Cuirfidh an chéim seo ar do chumas gach ceangaltán a roghnú sa teachtaireacht ríomhphoist roghnaithe seo ag an am céanna.

Céim 4: Cliceáil ar an Bain Ceangaltán cnaipe sa gníomhartha grúpa ar an Ceangaltáin Tab.

Céim 5: Sa bhosca dialóige rabhaidh, cliceáil ar an Bain Ceangaltáin cnaipe.

Ansin scriostar gach ceangaltán sa teachtaireacht ríomhphoist roghnaithe seo a luaithe is féidir.

nótaí: Oibríonn an ghné Bain Ceangaltáin go breá in Outlook 2010 agus sa leagan níos déanaí, ach ní in Outlook 2007.


Bain gach ceangaltán go héasca ó iliomad ríomhphoist roghnaithe in Outlook:

Leis an Detach Gach ceangaltán fóntais de Kutools le haghaidh Excel, is féidir leat gach ceangaltán a bhaint go héasca ó iliomad ríomhphoist roghnaithe mar an taispeántas thíos a thaispeántar. (Sábhálfar na ceangaltáin i bhfillteán sonraithe) Íoslódáil agus bain triail as anois! (tras saor in aisce 30-lá)


Bain gach ceangaltán ó iliomad teachtaireachtaí ríomhphoist in Outlook le cód VBA

Más mian leat gach ceangaltán a bhaint ó iliomad teachtaireachtaí ríomhphoist i Microsoft Outlook, cuideoidh an modh seo a leanas leat é a dhéanamh go héasca. Molaimid duit cumasaigh gach macraí i do Microsoft Outlook ar dtús.

Céim 1: Téigh chuig fillteán na Mo Doiciméad, cruthaigh fillteán nua, agus ainmnigh é mar OL Ceangaltáin

Céim 2: Roghnaigh teachtaireachtaí ríomhphoist iomadúla a mbainfidh tú a gceangaltáin níos déanaí.

Nóta: Is féidir leat teachtaireachtaí ríomhphoist neamhfhreagracha a roghnú leis an Ctrl eochair agus cliceáil.

Is féidir leat teachtaireachtaí ríomhphoist as a chéile a roghnú agus an Shift eochair agus cliceáil.

Céim 3: Oscail Eagarthóir VBA le brúigh an Eile eochair agus F11 eochair ag an am céanna.

Céim 4: Leathnaigh an Project1 > Microsoft Outlook Object sa bharra ar chlé, agus ansin cliceáil faoi dhó ar an ThisOutlookSession chun é a oscailt san Eagarthóir. Féach an griangraf seo a leanas:

Céim 5: Cóipeáil agus greamaigh an cód VBA seo a leanas sa phána eagarthóireachta.

Public Sub ReplaceAttachmentsToLink()
Dim objApp As Outlook.Application
Dim aMail As Outlook.MailItem 'Object
Dim oAttachments As Outlook.Attachments
Dim oSelection As Outlook.Selection
Dim i As Long
Dim iCount As Long
Dim sFile As String
Dim sFolderPath As String
Dim sDeletedFiles As String
 
    ' Get the path to your My Documents folder
    sFolderPath = CreateObject("WScript.Shell").SpecialFolders(16)
    On Error Resume Next
 
    ' Instantiate an Outlook Application object.
    Set objApp = CreateObject("Outlook.Application")
 
    ' Get the collection of selected objects.
    Set oSelection = objApp.ActiveExplorer.Selection
 
    ' Set the Attachment folder.
    sFolderPath = sFolderPath & "\OLAttachments"
 
    
    ' Check each selected item for attachments. If attachments exist,
    ' save them to the Temp folder and strip them from the item.
    For Each aMail In oSelection
 
    ' This code only strips attachments from mail items.
    ' If aMail.class=olMail Then
    ' Get the Attachments collection of the item.
    Set oAttachments = aMail.Attachments
    iCount = oAttachments.Count
     
       
    If iCount > 0 Then
     
        ' We need to use a count down loop for removing items
        ' from a collection. Otherwise, the loop counter gets
        ' confused and only every other item is removed.
         
        For i = iCount To 1 Step -1
         
            ' Save attachment before deleting from item.
            ' Get the file name.
            sFile = oAttachments.Item(i).FileName
             
            ' Combine with the path to the Temp folder.
            sFile = sFolderPath & "\" & sFile
             
            ' Save the attachment as a file.
            oAttachments.Item(i).SaveAsFile sFile
             
            ' Delete the attachment.
            oAttachments.Item(i).Delete
             
            'write the save as path to a string to add to the message
            'check for html and use html tags in link
            If aMail.BodyFormat <> olFormatHTML Then
                sDeletedFiles = sDeletedFiles & vbCrLf & "<file://" & sFile & ">"
            Else
                sDeletedFiles = sDeletedFiles & "<br>" & "<a href='file://" & _
                sFile & "'>" & sFile & "</a>"
            End If
             
                         
        Next i
        'End If
             
       ' Adds the filename string to the message body and save it
       ' Check for HTML body
       If aMail.BodyFormat <> olFormatHTML Then
           aMail.Body = aMail.Body & vbCrLf & _
           "The file(s) were saved to " & sDeletedFiles
       Else
           aMail.HTMLBody = aMail.HTMLBody & "<p>" & _
           "The file(s) were saved to " & sDeletedFiles & "</p>"
       End If
       
       aMail.Save
       'sets the attachment path to nothing before it moves on to the next message.
       sDeletedFiles = ""
    
       End If
    Next 'end aMail
     
ExitSub:
 
Set oAttachments = Nothing
Set aMail = Nothing
Set oSelection = Nothing
Set objApp = Nothing
End Sub

Céim 6: Brúigh eochair F5 chun an cód VBA seo a rith.

Anois baintear gach ceangaltán ó theachtaireachtaí ríomhphoist roghnaithe, agus hipearnasc fágtha le gach ceangaltán scriosta ag bun gach teachtaireachta ríomhphoist roghnaithe.


Bain gach ceangaltán go héasca ó ríomhphost amháin nó níos mó le Kutools for Outlook

An Dícheangail Uile ceangaltáin fóntais de Kutools le haghaidh Outlook in ann gach ceangaltán a bhaint go tapa ó r-phost roghnaithe amháin nó níos mó in Outlook. Déan mar a leanas le do thoil.

Kutools le haghaidh Outlook : le níos mó ná 100 breiseán áisiúil Outlook, saor chun triail a dhéanamh gan aon teorannú i 60 lá.

1. Roghnaigh teachtaireacht ríomhphoist amháin nó níos mó leis na ceangaltáin a theastaíonn uait a bhaint, ansin cliceáil Kutools > Uirlisí CeangailDícheangail Uile. Féach an pictiúr:

2. Sa Socruithe Detach bosca dialóige, cumraigh mar a leanas le do thoil.

  • 2.1 Cliceáil ar an Brabhsáil cnaipe chun fillteán a roghnú chun gach ceangaltán scriosta a shábháil.
  • 2.2 De réir réamhshocraithe, déanann an Déan ceangal (anna) a dhícheangal sa stíl thíos seiceáiltear bosca, roghnaigh rogha le do thoil chun na ceangaltáin a shábháil i bhfillteáin éagsúla bunaithe ar ríomhphoist de réir mar is gá duit.
  • 2.3 Cliceáil ar an OK cnaipe. Féach an pictiúr:

nótaí:
1. Más mian leat gach ceangaltán a shábháil san fhillteán céanna, dícheangail an Cruthaigh fofhillteáin sa stíl seo a leanas bosca.
2. Tar éis ceangaltáin a bhaint, imeoidh deilbhín an cheangaltáin ó r-phost an liosta seoltaí. Is féidir leat an Tá deilbhín astaithe fós sna ríomhphoist bosca chun é a choinneáil i gcónaí.
2. Seachas gach ceangaltán a bhaint de ríomhphoist roghnaithe, is féidir leat ceangaltáin a bhaint de réir coinníollacha sonracha amháin. Mar shampla, níl uait ach na ceangaltáin a bhfuil a méid níos mó ná 500KB a bhaint, cliceáil ar an Roghanna Casta cnaipe chun na coinníollacha a leathnú, agus ansin cumraigh mar an screebshot thíos a thaispeántar.

3. Cliceáil ar an Is ea cnaipe sa Dícheangail Uile dialóg.

4. Ansin a Kutools le haghaidh Outlook beidh bosca dialóige aníos chun a insint duit cé mhéad ceangaltán a scriostar. Cliceáil le do thoil ar an OK cnaipe. 

Anois baintear gach ceangaltán láithreach agus ní fhágann ach na hipearnasc i ríomhphoist roghnaithe. Is féidir leat an hipearnasc a chliceáil chun an ceangaltán comhfhreagrach a oscailt de réir mar is gá duit.

  Más mian leat triail saor in aisce (60 lá) a bheith agat ar an bhfóntas seo, cliceáil le do thoil chun é a íoslódáil, agus ansin téigh chun an oibríocht a chur i bhfeidhm de réir na gcéimeanna thuas.


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 (33)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello,
MS recently changed the storage limits for Hotmail. Attachments are counted towards storage used.
Many users would like to remove only the attachments in bulk. Your VBA script may be the solution for these users.
Can you confirm if this script still works for Hotmail users in 2023?
Thank you in advance.
This comment was minimized by the moderator on the site
The article and the comments below are very helpful! Thanks!
This comment was minimized by the moderator on the site
 Hello, I use the VBA code, unfortunaltely all the attachements were deleted from the emails, and they were not storage in any of the folders... so i lost many attachment files. anyone knows how can i restored
This comment was minimized by the moderator on the site
The VBA code shown in solution 2 works fine, however, but my goal is to remove only attachments which are not inline the message. Being VBA ignorant I would like to ask if it is possible to modify the code in that manner it would remove only attached files, not pictures inside the email text. It would surely make my day :)

Thank you in advance
This comment was minimized by the moderator on the site
Can somebody change the code so that only for example attachments named "TermsAndConditions.pdf" are deleted
This comment was minimized by the moderator on the site
Dear Rene,
Please follow the steps in the above second method, run the below VBA code. In an opening dialog box, please enter the attachment's name with the file extension (such as test.docx), and then click the OK button to just remove it from the selected email.

Sub ReplaceAttachmentsToLink()
Dim xMail As Outlook.MailItem
Dim xAttachments As Outlook.Attachments
Dim xSelection As Outlook.Selection
Dim i, xCount As Long
Dim xFile, xFldPath, xDelFiles, xFileName As String
Dim xFlag As Boolean

xFldPath = CreateObject("shell.Application").NameSpace(5).self.Path
On Error Resume Next
Set xSelection = Outlook.ActiveExplorer.Selection
xFldPath = xFldPath & "\OLAttachments"
xFlag = False
xFileName = InputBox("Attachment name:", "Kutools for Outlook")

If StrPtr(xFileName) = 0 Then Exit Sub
If xFileName <> "" Then
For Each xMail In xSelection
Set xAttachments = xMail.Attachments
xCount = xAttachments.Count
If xCount > 0 Then
For i = xCount To 1 Step -1
xFile = xAttachments.Item(i).FileName
If xFileName = xFile Then
xFlag = True
xFile = xFldPath & "\" & xFile
xAttachments.Item(i).SaveAsFile xFile
xAttachments.Item(i).Delete
If xMail.BodyFormat <> olFormatHTML Then
xDelFiles = xDelFiles & vbCrLf & ""
Else
xDelFiles = xDelFiles & "
" & "" & xFile & ""
End If
End If
Next i
If xFlag = True Then
If xMail.BodyFormat <> olFormatHTML Then
xMail.Body = xMail.Body & vbCrLf & "The file(s) were saved to " & xDelFiles
Else
xMail.HTMLBody = xMail.HTMLBody & "
" & "The file(s) were saved to " & xDelFiles & "
"
End If
End If
xMail.Save
xDelFiles = ""
End If
Next
If xFlag = False Then
MsgBox "The Attachment does not exist!"
Else
MsgBox "The attachment has been deleted."
End If
Else
MsgBox "Please input a attachment name"
End If
Set xAttachments = Nothing
Set xMail = Nothing
Set xSelection = Nothing
End Sub
This comment was minimized by the moderator on the site
Method 1 doesn't work here, as there's only 1 option under 'Selection': Copy.
This comment was minimized by the moderator on the site
Dear Peter,
Outlook users are reporting that the Select All (attachments) feature in Outlook 2016 is missing.
This comment was minimized by the moderator on the site
The VBA Code solution was great .... worked beautifully
This comment was minimized by the moderator on the site
Compile Error Sub or Function not defined??
This comment was minimized by the moderator on the site
VBA code worked great. Many thanks!
This comment was minimized by the moderator on the site
Hi This was really helpful , but as all attachments were not saved when i tried again it gives a message "the macros in this project are disabled".....tried enabling macros in outlook but no luck, any one can help! Regards Lisa
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