ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
CDClaire Divas16/11/2018

I’m asking here this question because I’m getting no responses on other several C# forums.

I have a C# application in which I’m trying to open OST file. After initialization of all functions, file path, file name and root folder. During testing of C# application error occur. First time I have seen weird error. To resolve this weird error, I have changed the source code and restarted the application again. While starting the application, same error again occur.

The code which I have used in C# is:

Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();

NameSpace outlookNs = app.GetNamespace("MAPI");

// Add PST file (Outlook Data File) to Default Profile

  • outlookNs.AddStore(pstFilePath);

MAPIFolder rootFolder = outlookNs.Stores[pstName].GetRootFolder();

Folders subFolders = rootFolder.Folders;

I have tried to search problem regarding OST file in C# over this forum but can’t find any question.

https://forum.solidworks.com/discussion/

After using Google, I have found few approaches. In these approaches lots of coding involved. Probably this may solve problem.

https://community.hortonworks.com/questions/226407/view-ost-file-in-c-language.html

https://powershell.org/forums/topic/unable-to-open-ost-file-in-c-net/

https://www.stellarinfo.com/convert-ost-to-pst.php

https://community.rackspace.com/general/f/general-discussion-forum/8881/how-to-open-ost-file-using-c-code

http://forums.codeguru.com/showthread.php?562219-How-Do-I-Open-OST-file-using-C

Please suggest, which approach is better than other approaches.