0

I have been attempting this all morning (VS2K10, OL2K7, .NET 3.5) and my PSTs never attach. I've modified the path to include escaped slashes, no dice. I occasionally see the PST get added then disappear when I hit the command bar button for which I am trying to program.

Here is a snip of my code:

void b_removedPSTs_Click(Office.CommandBarButton Ctrl, ref bool CancelDefault)
{
  string PSTToAdd = dd_removed_PSTs.Text;

  foreach (PSTWithPath p in removedPSTs)
  {
    if (PSTToAdd == p.name)
    {
      olApp.Session.AddStore(@p.path);
    }
  }

  UpdateRemovedList();

}

PSTWithPath is a custom class I've created as follows:

public class PSTWithPath { public string name; public string path; public Outlook.MAPIFolder mapifolder;

public PSTWithPath(string PSTName, string PSTPath, Outlook.MAPIFolder PSTMAPIFolder)
{
  name = PSTName;
  path = PSTPath;
  mapifolder = PSTMAPIFolder;
}

Advice would be greatly appreciated.

Thanks, Larry

Larry G. Wapnitsky
  • 1,216
  • 2
  • 16
  • 35
  • Updated info: I can successfully add a PST from a local drive, but the network drives are where I'm having an issue. (and, yes, I know that PSTs on a network are hazardous...that's part of why I'm writing this add-in for my users) – Larry G. Wapnitsky Oct 11 '10 at 18:35

1 Answers1

0

I solved the issue. It seems that the function was being case sensitive. Not sure if this was a MS or Novell thing, but it's working now.

Larry G. Wapnitsky
  • 1,216
  • 2
  • 16
  • 35