DOCX JPG PDF XML PST
  Product Family
VCF

تحويل PST إلى VCF باستخدام C++

تحويل PST إلى VCF عالي الأداء باستخدام مكتبة البريد الإلكتروني C++.

كيفية تحويل PST إلى VCF باستخدام C++

من أجل تحويل PST إلى VCF، سنستخدم

Aspose.Email لـ C++

API غني بالميزات، قوي وسهل الاستخدام لمعالجة وتحويل المستندات لمنصة C++. يمكنك تنزيل أحدث نسخة مباشرةً، فقط افتح

NuGet

مدير الحزم، ابحث عن Aspose.Email.Cpp وقم بالتثبيت. يمكنك أيضًا استخدام الأمر التالي من وحدة تحكم مدير الحزم.

الأمر

PM> Install-Package Aspose.Email.Cpp

خطوات تحويل PST إلى VCF عبر C++

يمكن لمبرمجي C++ بسهولة تحويل ملف PST إلى VCF ببضع أسطر من الكود فقط.

  • حمّل ملف PST باستخدام PersonalStorage::FromFile.
  • استدعِ طريقة SaveAs() التي تحتوي على معلمتين.
  • إخراج ملف VCF و FileFormat::Vcf كمعاملات.
  • سيتم حفظ ملف VCF في المسار المحدد.
  • افتح ملف VCF في برنامج متوافق.

متطلبات النظام

قبل تشغيل كود التحويل بـ C++، تأكد من وجود المتطلبات المسبقة التالية.

  • Microsoft Windows أو نظام تشغيل متوافق مع بيئة تشغيل C++ لنظام Windows 32 بت، Windows 64 بت و Linux 64 بت.
  • تم الإشارة إلى DLL الخاص بـ Aspose.Email لـ C++ في مشروعك.
 

تحويل PST إلى VCF - C++

// Load the Outlook PST file
System::SharedPtr<PersonalStorage> personalStorage = PersonalStorage::FromFile(L"Outlook.pst");
// Get the Contacts folder
System::SharedPtr<FolderInfo> folderInfo = personalStorage->get_RootFolder()->GetSubFolder(L"Contacts");
// Loop through all the contacts in this folder
System::SharedPtr<MessageInfoCollection> messageInfoCollection = folderInfo->GetContents();
    
{
    auto messageInfo_enumerator = (messageInfoCollection)->GetEnumerator();
    decltype(messageInfo_enumerator->get_Current()) messageInfo;
    while (messageInfo_enumerator->MoveNext() && (messageInfo = messageInfo_enumerator->get_Current(), true)){
        // Get the contact information
        System::SharedPtr<MapiContact> contact = System::DynamicCast<Aspose::Email::Outlook::MapiContact>(personalStorage->ExtractMessage(messageInfo)->ToMapiMessageItem());
        
        // Save to disk in vCard VCF format
        contact->Save(L"Contacts\\" + contact->get_NameInfo()->get_DisplayName() + L".vcf", Aspose::Email::Outlook::ContactSaveFormat::VCard);
    }
}  
 
  • PST to VCF Conversion Live Demos

    التحويلات المدعومة الأخرى

    يمكنك أيضًا تحويل PST إلى العديد من تنسيقات الملفات الأخرى بما في ذلك القليل المذكورة أدناه.

    PST TO EML (رسائل بريد Outlook)
    PST TO EMLX (Apple EMLX Format)
    PST TO HTML (لغة ترميز النص الفائق)
    PST TO ICS (iCalendar)
    PST TO MBOX (رسائل البريد الإلكتروني)
    PST TO MHTML (تنسيق أرشيف صفحات الويب)
    PST TO MSG (صيغة Outlook & Exchange)
    PST TO OFT (قوالب بريد Outlook)
    PST TO OST (ملفات التخزين غير المتصلة)