DOCX
JPG
PDF
XML
PST
ICS
C++에서 PST를 ICS로 변환
C++ Email 라이브러리를 사용한 고성능 PST에서 ICS로 변환
C++를 사용하여 PST를 ICS로 변환하는 방법
PST를 ICS로 변환하기 위해, 우리는 다음을 사용할 것입니다
C++ 플랫폼용 풍부한 기능과 강력하고 사용하기 쉬운 문서 조작 및 변환 API입니다. 최신 버전을 직접 다운로드하려면, 바로 열어보세요
패키지 관리자를 열고 Aspose.Email.Cpp를 검색한 후 설치하십시오. 또한 패키지 관리자 콘솔에서 다음 명령을 사용할 수 있습니다.
명령
PM> Install-Package Aspose.Email.Cpp
C++를 사용하여 PST를 ICS로 변환하는 단계
C++ 프로그래머는 몇 줄의 코드만으로 PST 파일을 쉽게 ICS로 변환할 수 있습니다.
- PersonalStorage::FromFile로 PST 파일을 로드합니다.
- 두 개의 매개변수를 가진 SaveAs() 메서드를 호출합니다.
- 출력 매개변수로 ICS 파일과 FileFormat::Ics를 지정합니다.
- ICS 파일은 지정된 경로에 저장됩니다.
- 호환 프로그램에서 ICS 파일을 엽니다.
시스템 요구 사항
C++ 변환 코드를 실행하기 전에 다음 선행 조건을 확인하십시오.
- Windows 32비트, Windows 64비트 및 Linux 64비트를 위한 C++ 런타임 환경이 포함된 Microsoft Windows 또는 호환 OS.
- 프로젝트에 참조된 Aspose.Email for C++ DLL.
PST를 ICS로 변환 - C++
// Load the Outlook PST file
System::SharedPtr<PersonalStorage> pst = PersonalStorage::FromFile(dataDir + L"Sub.pst");
// Get the Calendar folder
System::SharedPtr<FolderInfo> folderInfo = pst->get_RootFolder()->GetSubFolder(L"Inbox");
// Loop through all the calendar items 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 calendar information
System::SharedPtr<MapiMessage> calendar = System::DynamicCast<Aspose::Email::Outlook::MapiMessage>(pst->ExtractMessage(messageInfo)->ToMapiMessageItem());
// Save to disk in ICS format
calendar->Save(L"\\Calendar\\" + calendar->get_Subject() + L"_out.ics");
}
}
PST to ICS Conversion Live Demos
지원되는 기타 변환
아래에 나열된 몇 가지를 포함하여 PST를 다른 많은 파일 형식으로 변환할 수도 있습니다.
PST TO EML (Outlook 이메일 메시지)
PST TO EMLX (Apple EMLX 형식)
PST TO HTML (하이퍼텍스트 마크업 언어)
PST TO MBOX (전자 메일 메시지)
PST TO MHTML (웹 페이지 아카이브 형식)
PST TO MSG (Outlook 및 Exchange 형식)
PST TO OFT (Outlook 이메일 템플릿)
PST TO OST (오프라인 저장 파일)
PST TO VCF (가상 카드 형식)