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

or

Sut i arbed nifer o negeseuon e-bost a ddewiswyd fel ffeiliau MSG mewn swmp yn Outlook?

Mae'n hawdd arbed e-bost fel ffeil MSG yn Outlook. Sut allwch chi arbed nifer o negeseuon e-bost a ddewiswyd fel ffeiliau MSG unigol mewn swmp yn Outlook? Bydd yr erthygl hon yn dangos dull i chi ei gyflawni.

Cadwch sawl e-bost a ddewiswyd fel ffeiliau MSG gyda chod VBA


Cadwch sawl e-bost a ddewiswyd fel ffeiliau MSG gyda chod VBA

Gall y cod VBA canlynol eich helpu i arbed nifer o negeseuon e-bost a ddewiswyd fel ffeiliau MSG unigol mewn swmp yn Outlook. Gwnewch fel a ganlyn.

1. Dewiswch yr e-byst rydych chi am eu cadw fel ffeiliau MSG. Yna pwyswch y bysellau Alt + F11 ar yr un pryd i agor ffenestr Microsoft Visual Basic for Applications.

2. Yn ffenestr Microsoft Visual Basic for Applications, cliciwch Mewnosod> Modiwl, ac yna copïwch isod god VBA i mewn i ffenestr y Modiwl.

Cod VBA: Cadwch sawl e-bost dethol fel ffeiliau MSG unigol yn Outlook

Public Sub SaveMessageAsMsg()
'Update by Extendoffice 2018/3/5
Dim xMail As Outlook.MailItem
Dim xObjItem As Object
Dim xPath As String
Dim xDtDate As Date
Dim xName, xFileName As String
On Error Resume Next
Set xShell = CreateObject("Shell.Application")
Set xFolder = xShell.BrowseForFolder(0, "Select a folder:", 0, strStartingFolder)
If Not TypeName(xFolder) = "Nothing" Then
    Set xFolderItem = xFolder.self
    xFileName = xFolderItem.Path & "\"
Else
    xFileName = ""
    Exit Sub
End If
For Each xObjItem In Outlook.ActiveExplorer.Selection
    If xObjItem.Class = olMail Then
        Set xMail = xObjItem
        xName = xMail.Subject
        xDtDate = xMail.ReceivedTime
        xName = Format(xDtDate, "yyyymmdd", vbUseSystemDayOfWeek, _
          vbUseSystem) & Format(xDtDate, "-hhnnss", _
          vbUseSystemDayOfWeek, vbUseSystem) & "-" & xName & ".msg"
        xPath = xFileName + xName
        xMail.SaveAs xPath, olMSG
    End If
Next
End Sub

3. Pwyswch y fysell F5 i redeg y cod.

4. Yn y blwch deialog Pori Am Ffolder, nodwch ffolder i gadw'r ffeiliau MSG ac yna cliciwch ar y botwm OK. Gweler y screenshot:

Nawr mae'r holl negeseuon e-bost a ddewiswyd yn cael eu cadw fel ffeiliau MSG unigol fel y dangosir isod.


Yn hawdd arbed e-byst dethol fel ffeiliau fformat gwahanol yn Outlook:

Efo'r Arbed Swmp cyfleustodau Kutools ar gyfer Rhagolwg, gallwch yn hawdd arbed sawl e-bost a ddewiswyd ffeil fformat HTML unigol, ffeil fformat TXT, dogfen Word, ffeil CSV yn ogystal â ffeil PDF yn Outlook fel y dangosodd isod screenshot. Dadlwythwch a rhoi cynnig arni nawr! (Llwybr am ddim 60 diwrnod)


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.
    David · 1 years ago
    It doesn't seem to work when emails are displayed in conversation mode or from a Group folder.
  • To post as a guest, your comment is unpublished.
    Yuki · 2 years ago
    Hi, i am new to macro. i am looking for a macro that allows me to save the filename, not by subject or time. But by the reference # found inside the email body. This macro works well when i save multiple emails into my folder. But as i want each email to be saved using the reference #, would you have a macro for it? The reference # is found on the 6th row of the emails body (REF : WL344ET2), that i received everyday. Appreciate if anyone can help on this and thank you in advance.
  • To post as a guest, your comment is unpublished.
    climbp19981 · 2 years ago
    When there is a ":" in the subject, this code cannot copy the whole subject to be the name of the saved message, is there any way to solve this problem?
    • To post as a guest, your comment is unpublished.
      Daniel · 2 years ago
      change line 21 to xName="". The saved message filname will not include the subject anymore.
      • To post as a guest, your comment is unpublished.
        Mathias · 2 years ago
        A better way is to always replace ":" with blanks adding this line under xName = xMail.Subject

        xName = Replace(xName, ":", "")