problems with adStore method (VB.NET)

K

Krakke (DK)

Hi

Im having trouble using the "addStore()" method in a application im creating.

Im trying to add a store in Outlook in the form of a .pst file, and it only
works sometimes.
So after trying a 100 different things to make sure there is no access
conflicts or so, I find out the problem is the lenght of the string holding
the filename "C:\test\Backup_UserName_x.pst"

Can this really be true??

I know I can use a random code based on the datetime to create the backup
file, but i would like to use the username, so it will be easy to find the
right backup store later.

Any help or ideas will be appreciated greatly (so will english lessons hehe)
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder

objOL = New Outlook.Application
objNS = objOL.GetNamespace("MAPI")

objNS.AddStore("C:\tralala\test.pst") <-- this works
objNS.AddStore("C:\vrtest\Backup_abcdefghijklm_1.pst") <-- this dosen't
<<
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top