انتقل إلى المحتوى الرئيسي

كيفية إنشاء تذكيرات Outlook من جدول بيانات Excel؟

تتحدث هذه المقالة عن إنشاء تذكيرات Outlook بناءً على بيانات جدول بيانات Excel.

تذكير Crete Outlook من جدول بيانات Excel برمز VBA


قم بإنشاء تذكيرات Outlook من جدول بيانات Excel باستخدام رمز VBA

إذا كنت تريد إنشاء تذكيرات Outlook من Excel ، فالرجاء القيام بما يلي.

1. إنشاء ورقة عمل تحتوي على رؤوس الأعمدة وحقول التذكير المقابلة كما هو موضح أدناه لقطة الشاشة.

ملاحظات: ل حالة مشغول العمود ، الرقم 2 يعني أن التذكير سيظهر على شكل مشغول في تقويم Outlook الخاص بك. يمكنك تغييره إلى 1 (مبدئي), 3 (خارج المكتب), 4 (العمل في مكان آخر)الطرق أو 5 (مجانًا) ما تحتاج إليه.

2. اضغط على قديم + F11 مفاتيح لفتح ميكروسوفت فيسوال باسيك للتطبيقات نافذة.

3. في ال ميكروسوفت فيسوال باسيك للتطبيقات الإطار، انقر فوق إدراج > وحدة. ثم انسخ رمز VBA أدناه في نافذة التعليمات البرمجية.

رمز فبا: إنشاء تذكيرات Outlook من جدول بيانات Excel

Sub AddAppointments()
'Update by Extendoffice 20180608
    Dim I As Long
    Dim xRg As Range
    Dim xOutApp As Object
    Dim xOutItem As Object
    Set xOutApp = CreateObject("Outlook.Application")
    Set xRg = Range("A2:G2")
    For I = 1 To xRg.Rows.Count
        Set xOutItem = xOutApp.createitem(1)
        Debug.Print xRg.Cells(I, 1).Value
        xOutItem.Subject = xRg.Cells(I, 1).Value
        xOutItem.Location = xRg.Cells(I, 2).Value
        xOutItem.Start = xRg.Cells(I, 3).Value
        xOutItem.Duration = xRg.Cells(I, 4).Value
        If Trim(xRg.Cells(I, 5).Value) = "" Then
            xOutItem.BusyStatus = 2
        Else
            xOutItem.BusyStatus = xRg.Cells(I, 5).Value
        End If
        If xRg.Cells(I, 6).Value > 0 Then
            xOutItem.ReminderSet = True
            xOutItem.ReminderMinutesBeforeStart = xRg.Cells(I, 6).Value
        Else
            xOutItem.ReminderSet = False
        End If
        xOutItem.Body = xRg.Cells(I, 7).Value
        xOutItem.Save
        Set xOutItem = Nothing
    Next
    Set xOutApp = Nothing
End Sub

ملاحظات: في الكود أعلاه ، ج 2: G2 هو نطاق البيانات الذي تريد إنشاء المواعيد بناءً عليه.

4. اضغط على F5 مفتاح أو انقر فوق الزر "تشغيل" لتشغيل التعليمات البرمجية. ثم سيتم إدراج جميع المواعيد التي تحتوي على حقول محددة في تقويم Outlook الخاص بك مرة واحدة.

وبعد ذلك ، يمكنك الانتقال إلى تقويم توقعاتك لعرض النتائج ، انظر لقطة الشاشة: 


أفضل أدوات إنتاجية المكتب

كوتولس لتوقعات - أكثر من 100 ميزة قوية لتعزيز توقعاتك

🤖 مساعد بريد الذكاء الاصطناعي: رسائل بريد إلكتروني احترافية فورية مع سحر الذكاء الاصطناعي - بنقرة واحدة للردود العبقرية، والنغمة المثالية، وإتقان متعدد اللغات. تحويل البريد الإلكتروني دون عناء! ...

📧 أتمتة البريد الإلكتروني: خارج المكتب (متوفر لـ POP وIMAP)  /  جدولة إرسال رسائل البريد الإلكتروني  /  نسخة تلقائية/نسخة مخفية الوجهة حسب القواعد عند إرسال البريد الإلكتروني  /  إعادة التوجيه التلقائي (القواعد المتقدمة)   /  إضافة تحية تلقائية   /  تقسيم رسائل البريد الإلكتروني متعددة المستلمين تلقائيًا إلى رسائل فردية 

📨 إدارة البريد الإلكتروني: استدعاء رسائل البريد الإلكتروني بسهولة  /  حظر رسائل البريد الإلكتروني الاحتيالية حسب الموضوعات والآخرين  /  حذف رسائل البريد الإلكتروني المكررة  /  المزيد من خيارات البحث  /  توحيد المجلدات 

📁 المرفقات بروحفظ دفعة  /  فصل دفعة  /  ضغط دفعة  /  حفظ تلقائي   /  فصل تلقائي  /  ضغط تلقائي 

؟؟؟؟ واجهة ماجيك: 😊 المزيد من الرموز التعبيرية الجميلة والرائعة   /  عزز إنتاجية Outlook الخاص بك باستخدام طرق العرض المبوبة  /  تصغير Outlook بدلاً من الإغلاق 

؟؟؟؟ بنقرة واحدة عجائب: الرد على الكل بالمرفقات الواردة  /   رسائل البريد الإلكتروني لمكافحة التصيد  /  🕘إظهار المنطقة الزمنية للمرسل 

👩🏼‍🤝‍👩🏻 جهات الاتصال والتقويم: دفعة إضافة جهات الاتصال من رسائل البريد الإلكتروني المحددة  /  تقسيم مجموعة اتصال إلى مجموعات فردية  /  إزالة تذكير عيد ميلاد 

على مدى ميزات 100 في انتظار الاستكشاف الخاص بك! انقر هنا لاكتشاف المزيد.

 

 

Comments (65)
Rated 5 out of 5 · 2 ratings
This comment was minimized by the moderator on the site
How can I make this module run automatically when I close Excel? That way I can input data, and only have to close the file without having to manually run the code?
This comment was minimized by the moderator on the site
Hello:

Thank you all for this amazing forum. I hope you will forgive me if this has already been asked, but is there a way to tweak the code to create an Outlook TASK instead of an appointment?

Please advise.

David
Rated 5 out of 5
This comment was minimized by the moderator on the site
How can I revise the code to include multiple rows?
This comment was minimized by the moderator on the site
HI Miller,

In this line Set xRg = Range("A2:G2") of the code, simply change the range "A2:G2" to a range containing multiple rows, such as "A2:G10"
This comment was minimized by the moderator on the site
This is a great tool. Was wondering if there is a way to add the appointments to a shared calendar, instead of my personal outlook calendar.
This comment was minimized by the moderator on the site
HI Crystal,
the code worked find, but I made some changes in Table & run the code again, now I have 2 reminders for same event, how to remove 1st reminder from my outlook calendar.
This comment was minimized by the moderator on the site
Hi Sushant Gawali,

The code only helps you to create reminders from Excel. If a duplicate reminder is created, you will need to go to the Outlook calendar to delete it manually. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
If we share the excel with other user and they run this micro-enabled filed, will they have all the invites saved?
This comment was minimized by the moderator on the site
Hi,
If you save this Excel file as an Excel Macro-Enabled Workbook and send it to someone else, the invitation will be saved in their Outlook calendar after running the VBA code.
This comment was minimized by the moderator on the site
Excellent, thanks!
Rated 5 out of 5
This comment was minimized by the moderator on the site
Hi Crystal,

Thank you for letting me know.
This comment was minimized by the moderator on the site
Thank you for posting your code, it works perfectly for me for adding to Outlook. Is there a way to add it to a Google Calendar instead?

Thanks.
This comment was minimized by the moderator on the site
Hi David Ramsay,
I can’t fix this problem. Sorry about that.
This comment was minimized by the moderator on the site
Hello,

For some reason it won’t pull all dates.
My range is A2:C14 and it seems to cherry pick dates. Any tips?
This comment was minimized by the moderator on the site
Hi Hailey,
You may need to attach a screenshot or a sample file to describe the problem you encountered more clearly.
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