Skip to main content

Conas ceangaltáin ó Outlook go fillteán áirithe a íoslódáil / a shábháil go huathoibríoch?

Cé go bhfuil sé éasca gach ceangaltán a shábháil ó ríomhphost amháin in Outlook ag baint úsáide as an Ceangaltáin > Sábháil Gach Ceangaltán rogha, is féidir le ceangaltáin ó ríomhphoist iolracha a bhainistiú, go háirithe i gcainníochtaí móra, a bheith níos dúshlánaí. Tugann an t-alt seo dhá réiteach éifeachtach isteach chun ceangaltáin a íoslódáil go huathoibríoch ó ríomhphoist Outlook chuig fillteán ar leith. Tá na modhanna seo úsáideach go háirithe agus iad ag déileáil le ríomhphoist agus ceangaltáin iomadúla, an próiseas a shimpliú agus am a shábháil.


Íoslódáil ceangaltáin Outlook go huathoibríoch chuig fillteán le VBA agus riail

Is éard atá i gceist leis an gcur chuige seo ná script VBA a úsáid, a dhéanfaidh, nuair a fhorghníomhófar é le riail shonrach, ceangaltáin a íoslódáil agus a shábháil go huathoibríoch ó ríomhphoist Outlook chuig fillteán ainmnithe. Lean ar aghaidh leis na céimeanna seo a leanas le do thoil:

  1. Preas Alt + F11 a oscailt Microsoft Visual Basic d’Fheidhmchláir fhuinneog.
  2. cliceáil Ionsáigh > Modúil, agus ansin greamaigh thíos script VBA isteach sa nua-oscailte Modúil fhuinneog.

    VBA: Ceangaltáin Outlook Auto Save i bhfillteán áirithe

    Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
    Dim oAttachment As Outlook.Attachment
    Dim sSaveFolder As String
    sSaveFolder = "C:\Users\DT168\Documents\outlook-attachments\"
    For Each oAttachment In MItem.Attachments
    oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
    Next
    End Sub

    Nóta: Aimsigh an líne le do thoil sSaveFolder = "C: \ Úsáideoirí \ DT168 \ Doiciméid \ dearcadh-ceangaltáin \", agus cuir cosán an fhillteáin scríbe atá uait ina ionad.

  3. Sábháil an script VBA agus dún an Microsoft Visual Basic d’Fheidhmchláir fhuinneog.
  4. Téigh go dtí an mail amharc, agus cliceáil Baile > Rialacha > Bainistigh Rialacha & Foláirimh.
  5. San oscailt Rialacha agus Foláirimh bosca dialóige, cliceáil le do thoil ar an Riail Nua cnaipe ar an Rialacha R-phoist Tab.
  6. sa Draoi Rialacha bosca dialóige gur dealraitheach, roghnaigh an Cuir riail ar na teachtaireachtaí a bhfaighidh mé rogha, agus cliceáil ar an Ar Aghaidh cnaipe.
  7. sa Treoraí Rialacha (Cén riocht(í) ba mhaith leat a sheiceáil?) bosca dialóige, cliceáil an Ar Aghaidh cnaipe gan aon roghanna a roghnú. Agus ansin cliceáil ar an Is ea cnaipe sa pop-up Microsoft Outlook dialóg.
  8. Seo a leanas Treoraí Rialacha (Cad ba mhaith leat a dhéanamh leis an teachtaireacht?) bosca dialóige, lean ar aghaidh mar seo a leanas:
    1. seiceáil an script a rith rogha. Leid: Mura bhfeiceann tú an rogha, le do thoil téigh go dtí an rang teagaisc seo ar chumasú an rogha "rith script" in Outlook.
    2. Cliceáil ar an téacs gorm "script" a bhfuil líne faoi chun an téacs a oscailt Roghnaigh Script bosca dialóige. Anseo, roghnaigh an script a chuir tú isteach 2 Céim agus cliceáil ar an OK cnaipe.
    3. Cliceáil ar an Ar Aghaidh cnaipe chun dul ar aghaidh.
  9. sa Treoraí Rialacha (An bhfuil aon eisceachtaí ann?) bosca dialóige, cliceáil le do thoil ar an Ar Aghaidh cnaipe go díreach.
  10. Sa deireadh Draoi Rialacha bosca dialóige, ainmnigh an riail sa 1 Céim bosca, seiceáil roghanna de réir mar is gá duit sa 2 Céim alt, agus cliceáil ar an Críochnaigh cnaipe.
  11. Dún an Rialacha agus Foláirimh dialóg.

Toradh

Anois, má roghnaigh tú an rogha "Rith an riail seo anois ar theachtaireachtaí atá sa bhosca isteach cheana féin", déanfar gach ceangaltán ó do chuntas ríomhphoist a íoslódáil agus a stóráil san fhillteán ceann scríbe sonraithe. Ina theannta sin, má sheiceáil tú an rogha "Cas ar an riail seo", déanfar gach ceangaltán ó ríomhphoist isteach a íoslódáil go huathoibríoch agus a shábháil isteach san fhillteán ainmnithe.


Íoslódáil ceangaltáin Outlook go huathoibríoch chuig fillteán le Kutools le haghaidh Outlook

Le Kutools le haghaidh Outlook suiteáilte ar do ríomhaire, a Auto Dícheangail cuireann an fheidhm seo ar do chumas gach ceangaltán Outlook nó ceangaltáin shonracha a íoslódáil go huathoibríoch bunaithe ar do choinníollacha socraithe, á threorú go háisiúil chuig an bhfillteán roghnaithe. Ina theannta sin, cuireann an ghné seo an tsolúbthacht chun fofhillteáin a chruthú. Soláthraíonn sé dhá rogha eile chun na fofhillteáin seo a ainmniú: is féidir leat ceann de na formáidí a roghnú, mar shampla [fillteán teachtaireachta] -[ábhar teachtaireachta], nó rogha a dhéanamh teaghrán saincheaptha téacs a chur i gceangal mar iarmhír leis an bhformáid atá roghnaithe agat. Cuireann an cumas seo go mór le heagrú agus le hinrochtaineacht do cheangaltán.

Kutools le haghaidh Outlook: Supercharge Outlook le níos mó ná 100 uirlisí nach mór a bheith acu. Déan tástáil air SAOR IN AISCE ar feadh 60 lá, gan aon teaghráin ceangailte!   Leigh Nios mo...   Íosluchtaigh Anois!

  1. cliceáil Kutools > Auto Dícheangail chun an dialóg gné a oscailt.
  2. sa Ceangaltáin Auto Detach dialóg, roghnaigh an Dícheangail uathoibríoch gach ceangaltán a fuarthas rogha, agus cumraigh mar seo a leanas:
    1. Cliceáil ar an gcnaipe brabhsáil chun an fillteán ceann scríbe a shonrú chun ceangaltáin scoite a shábháil go huathoibríoch.
    2. (Roghnach) Seiceáil an Dícheangail ceangaltáin sa stíl thíos rogha más mian leat fofhillteáin a chruthú chun na ceangaltáin a stóráil.
      • Cruthaigh fofhillteáin sa stíl thíos: Ainmnigh na fofhillteáin i gceann de na formáidí réamhshainithe, mar [fillteán teachtaireachta] -[ábhar teachtaireachta].
      • Athainmnigh na ceangaltáin shábháilte sa stíl thíos: Ainmnigh na fofhillteáin ag baint úsáide as ceann de na formáidí réamhshainithe agus cuir teaghrán saincheaptha téacs mar iarmhír.
    3. (Roghnach) Seiceáil an Tá deilbhín astaithe fós sna ríomhphoist rogha chun táscaire amhairc a choinneáil sna ríomhphoist a raibh ceangaltáin acu.
    4. cliceáil OK.

Toradh

Ag tosú anois, déanfar gach ceangaltán a shábháil go huathoibríoch chuig an bhfillteán sonraithe nuair a fhaightear na ríomhphoist.

Leid: Más mian leat díorma uathoibríoch ceangaltán a bhunú bunaithe ar rialacha sonracha, cumasaigh an Ceangaltáin dícheangail uathoibríoch de réir rialacha rogha sa Ceangaltáin Auto Detach dialóg. Tar éis sin, cliceáil ar an Nua cnaipe chun do choinníollacha scagaire agus na socruithe sábhála atá uait a shainiú.

Nótaí:

  • Ag iarraidh rochtain a fháil ar an Auto Dícheangail gné? Íosluchtaigh Kutools le haghaidh Outlook anois! Thairis sin, tá an iliomad gnéithe eile ag Kutools 100 + agus cuireann sé triail saor in aisce 60-lá ar fáil. Ná fan, bain triail as inniu!
  • Más mian leat ceangaltáin atá ann cheana féin a dhícheangal nó a íoslódáil ó ríomhphoist iomadúla / gach ríomhphost a fuarthas in Outlook, cuir Kutools i bhfeidhm le haghaidh Outlook's Detach All (Ceangaltáin) or Sábháil Gach (Ceangaltáin) gné.

Earraí gaolmhara:


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 (115)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Thank you for this information
This comment was minimized by the moderator on the site
May i ask some question?

I usually received mail to many people and many kinds of files.
So i should distinguish each file.
But now, It can`t.

So Did you have any idea for this?
(like chacnged file name or and so on...)

Thank you for your help

BR
Hansu
This comment was minimized by the moderator on the site
Thank you for your great code
This comment was minimized by the moderator on the site
Hi,
I create Module in Microsoft VBA & save it
However when go to create Rules in Outlook, I can't see the select box of "Run a script"
What is the reason & how to fix it?
Thank you
This comment was minimized by the moderator on the site
Hi there,

In some versions of Outlook, especially in more recent updates, the "Run a Script" option might be disabled by default due to security concerns. To enable the "Run a Script" option in Outlook, you usually need to modify the registry settings. Here's a general guide on how to do it:

1. Close Outlook: Make sure Outlook is not running.
2. Open Registry Editor: Press Win + R, type regedit, and hit Enter.
3. Navigate to the Outlook Security Settings: Depending on your version of Outlook, you'll need to navigate to a specific path in the Registry Editor. For example, for Outlook 2016, 2019, and Microsoft 365, you might navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Security.
4. Modify/Add the Registry Value:
4.1 Right-click in the right pane and choose New > DWORD (32-bit) Value.
4.2 Name the new value as EnableUnsafeClientMailRules.
4.3 Set its value to 1.
5. Close Registry Editor and restart your computer.
6. Open Outlook and check if the "Run a Script" option is available.
This comment was minimized by the moderator on the site
Ale kupa, oszuści. Maile zaczynają znikać. Nie mam moich wiadomości.
This comment was minimized by the moderator on the site
Hi, code works great however I am saving excel files and was wondering how I can modify the saved name. I recieve files like this "exa 2022-08.xlsx" how can I save the excel file as just "2022-08"?

this is my current code and my file saves however as just a file type not excel.

Public Sub PortlandDaily(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "T:\_Portland\Engineering Data\Daily Production Data\Test\"
For Each oAttachment In MItem.Attachments

Dim SplitName() As String
SplitName = Split(oAttachment.DisplayName, ".")

Dim RightName As String
RightName = Right(SplitName(0), 7)

Dim SaveName As String

SaveName = sSaveFolder & RightName

oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName

Next
End Sub
Rated 4.5 out of 5
This comment was minimized by the moderator on the site
Hi there,

Please try the code below:
Public Sub PortlandDaily(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "T:\_Portland\Engineering Data\Daily Production Data\Test\"
For Each oAttachment In MItem.Attachments
  Dim SplitName() As String
  SplitName = Split(oAttachment.DisplayName, ".")
  Dim RightName As String
  RightName = Right(SplitName(0), 7) 'You can also declare the file name here, e.g., RightName = "2022-08"
  Dim SaveName As String
  SaveName = sSaveFolder & RightName & "." & SplitName(1)
  oAttachment.SaveAsFile SaveName
Next
End Sub


Amanda
This comment was minimized by the moderator on the site
Hi. is it possible to give the attachment file an entirely new name, using information form the mail (for example the date of delivery).
This comment was minimized by the moderator on the site
Hi,
How can I create a VBA to save attachment (Excel file) in my location drive when email received in my outlook folder and using the file name based on cell value...Many thanks

Regards,
Anthony On
This comment was minimized by the moderator on the site
Bonjour, j'ai réussi à rajouter "exécuter un script" dans les règles et faire fonctionner le script dans outlook. Les pièces jointes d'un mail bien précis s'enregistrent parfaitement dans le dossier demandé. Sauf que j'aimerais enregistrer uniquement les fichiers .txt, et non les .pdf qui s'incrémentent également. Aussi j'ai une autre requête s'il vous plaît, le script fonctionne très bien pour définir un dossier de destination, mais je souhaite définir d'autres règles qui me permettraient d'enregistrer les pièces jointes d'autres mails vers un autre dossier de destination. J'ai essayé de faire un 2e module VBA, cela ne fonctionne pas. J'ai généré un deuxième projet VBA mais Outlook n'en gère qu'un seul. Dans ce cas, comment remédier s'il vous plait ? Merci pour ce tuto très clair pour moi qui suis débutante.
This comment was minimized by the moderator on the site
Hi pearl,
Could you please send the code you generated so that we can fix it?
Amanda
This comment was minimized by the moderator on the site
Hi Can we  download the attachment contains specific letters using VBA code
This comment was minimized by the moderator on the site
Hi DAS,
When you said “the attachment contains specific letters”, did you mean you want to download the attachments from specific letters?
Amanda
This comment was minimized by the moderator on the site
Hi,
I executed the VBA + Rule option and it seemed to work perfectly. However, it recently stopped working with no errors. The rule is set to read the subject line, move to a certain folder if there is a certain subject, and then run the script. I know the trigger is working in the rule because the first action (move to folder) is working as it should.
Any idea why the rule trigger would work, but the documents are no longer being saved?
Things I have tried/checked:-The file path is correct-I added delays in various spots in the vba using application.wait-outlook has been shutdown and re-opened, and so has my laptop
(disclosure: I am a bit of a VBA newbie, but have beginner level coding knowledge)
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