מהמייל לאקסל. יש כזה דבר?

מיכל Design

משתמש מקצוען
עיצוב גרפי
הדמיות בתלת מימד
D I G I T A L
עיצוב ואדריכלות פנים
אני רוצה לעשות שכשאני מקבלת מייל מסוים שגימייל יעביר לו אותו לטבלת אקסל כלשהיא.
יש כזה דבר?
אפשר לעשות כזה דבר?
או אולי תוסף לכרום שיכול לעשות כזה דבר?
תודה רבה
 

אייקוד

משתמש פעיל
  1. צור קובץ Excel חדש.
  2. הקלד "מספר" בתא A1, "שם השולח" בתא B1, "כתובת אימייל של השולח" בתא C1 ו- "נושא דוא"ל" בתא D1 ו"זמן קבלה " בתא E1
    Create-a-Excel-file.jpg
  3. שמור את הקובץ.
  4. הפעל את Outlook.
  5. לחץ על "Alt + F11", אשר יביא אותך לעורך VBA.
  6. בחלון המוקפץ, אתה צריך ללחוץ פעמיים על "ThisOutlookSession" בצד שמאל.
  7. הדבק את קוד VBA הבא לתוך החלון.
    קוד:
    Public WithEvents objMails As Outlook.Items
    
    Private Sub Application_Startup()
        Set objMails = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Items
    End Sub
    
    Private Sub objMails_ItemAdd(ByVal Item As Object)
        Dim objMail As Outlook.MailItem
        Dim strExcelFile As String
        Dim objExcelApp As Excel.Application
        Dim objExcelWorkBook As Excel.Workbook
        Dim objExcelWorkSheet As Excel.Worksheet
        Dim nNextEmptyRow As Integer
        Dim strColumnB As String
        Dim strColumnC As String
        Dim strColumnD As String
        Dim strColumnE As String
    
        If Item.Class = olMail Then
           Set objMail = Item
        End If
     
        'Specify the Excel file which you want to auto export the email list
        'You can change it as per your case
        strExcelFile = "E:\Email\Email Statistics.xlsx"
     
        'Get Access to the Excel file
        On Error Resume Next
        Set objExcelApp = GetObject(, "Excel.Application")
        If Error <> 0 Then
           Set objExcelApp = CreateObject("Excel.Application")
        End If
        Set objExcelWorkBook = objExcelApp.Workbooks.Open(strExcelFile)
        Set objExcelWorkSheet = objExcelWorkBook.Sheets("Sheet1")
     
        'Get the next empty row in the Excel worksheet
        nNextEmptyRow = objExcelWorkSheet.Range("B" & objExcelWorkSheet.Rows.Count).End(xlUp).Row + 1
     
        'Specify the corresponding values in the different columns
        strColumnB = objMail.SenderName
        strColumnC = objMail.SenderEmailAddress
        strColumnD = objMail.Subject
        strColumnE = objMail.ReceivedTime
     
        'Add the vaules into the columns
        objExcelWorkSheet.Range("A" & nNextEmptyRow) = nNextEmptyRow - 1
        objExcelWorkSheet.Range("B" & nNextEmptyRow) = strColumnB
        objExcelWorkSheet.Range("C" & nNextEmptyRow) = strColumnC
        objExcelWorkSheet.Range("D" & nNextEmptyRow) = strColumnD
        objExcelWorkSheet.Range("E" & nNextEmptyRow) = strColumnE
     
        'Fit the columns from A to E
        objExcelWorkSheet.Columns("A:E").AutoFit
     
        'Save the changes and close the Excel file
        objExcelWorkBook.Close SaveChanges:=True
    End Sub
    VBA-Codes-Auto-Export-Information-of-Incoming-Emails-to-an-Excel-File.jpg


  8. הכנס את כתובת האקסל שלך בשורה 23 ושמור את הקוד.
  9. הפעל מחדש את Outlook.
  10. מעתה והלאה, כל הודעות הדואר הנכנס יהיה אוטומטי מיוצא לקובץ Excel מראש ברגע שהם נוחת לתוך תיקיית הדואר הנכנס שלך.
    קובץ Excel ייראה כמו בתמונה הבאה:

    Excel-File-Containing-Information-of-Incoming-Emails.jpg
מקור
שגיאות תרגום: גוגל תרגום :)
 
נערך לאחרונה ב:

אולי מעניין אותך גם...

הפרק היומי

הפרק היומי! כל ערב פרק תהילים חדש. הצטרפו אלינו לקריאת תהילים משותפת!


תהילים פרק קכג

א שִׁיר הַמַּעֲלוֹת אֵלֶיךָ נָשָׂאתִי אֶת עֵינַי הַיֹּשְׁבִי בַּשָּׁמָיִם:ב הִנֵּה כְעֵינֵי עֲבָדִים אֶל יַד אֲדוֹנֵיהֶם כְּעֵינֵי שִׁפְחָה אֶל יַד גְּבִרְתָּהּ כֵּן עֵינֵינוּ אֶל יְהוָה אֱלֹהֵינוּ עַד שֶׁיְּחָנֵּנוּ:ג חָנֵּנוּ יְהוָה חָנֵּנוּ כִּי רַב שָׂבַעְנוּ בוּז:ד רַבַּת שָׂבְעָה לָּהּ נַפְשֵׁנוּ הַלַּעַג הַשַּׁאֲנַנִּים הַבּוּז לִגְאֵיוֹנִים:
נקרא  1  פעמים

לוח מודעות

למעלה