Importer skips folders and messages

  • Thread starter Thread starter MA
  • Start date Start date
M

MA

Dear,

We wrote a solution to import our user's non Outlook account using
Redemption. This solution has been working fine and now a user
reported that it skips folders for some account.

Solution import some folders then skips and import again. We could not
reproduce in-house with same data.

We are using Outlook 2003 (11.8313.8221). Is there any Outlook
settings which could interfare?

Sorry, I know its general question but we are confuse about what cause
this strange behaviour.

Thanks in advance.

Regards,
MA
 
Since no one here knows what settings you're talking about or exactly what
your code is doing or even what folders or type of folder you're talking
about I don't see how anyone could answer the question. You need to be more
specific and to possibly show some of the code you're using.

My guess is if you can't repro and only this user reports the problem that
the problem lies between his keyboard and chair (PEBKAC).
 
Thanks Ken for your response.

Further debugging the code, we have found that GetFolderFromPath()
Redemption call causing an exception to access a specific folder thus
unable to process any messages.

We have a class library which return a MAPIFolder then we use
rdoSession.GetFolderFromPath(folder path) method to get an instance of
RDOFolder then create messages. Its been working great so far except
for one user where his folder name as: "90%Polyphe, 60%Cate".

- If we change the folder name to "90% Polyphe, 60% Cate" then it
works fine.
- If we use rdoSession.GetFolderFromID() method then we can access the
folder but unable to create any messages in that folder.

Its not machine/account specific, we can reproduce in different
account. Any thoughts?


Regards,
MA
 
That sounds like a bug in your version of Redemption's GetFolderFromPath()
method. If I were you I'd ping Dmitry and see if he knows of the bug and if
he has a fix in place.
 
How exactly do you construct teh folder path? You yo uretrieve it from the
MAPIFolder.FodlerPath property? Or build it in your code?
Note tha tspecial charcaters (including "%") are encoded. E.g. in case of "%
something", the folder path will be "%% something".
GetFolderFromID is preferable. If you are unable to create in messages in
teh folder returned by GetFolderFromID, chances are you are passing 0 for
the last (Flags) parameter, which opens the folder in the read-only mode.
Pass MAPI_BEST_ACCESS (0x10) or Missing.Value (in case of .Net) - the
parameter is optional.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Thanks Ken and Dmitry for your response.
How exactly do you construct teh folder path?

I use MAPIFolder.FullFolderPath property:
rdoSession.GetFolderFromPath(olFolder.FullFolderPath)

You are spot on Dmitry about the flag in GetFolderFromID() method.
After using the Missing.Value flag, I can create messages in that
folder. I think Redemption docs need be bit clear about the flag.

RDOFolder rdofolder = rdoSession.GetFolderFromID(olFolder.EntryID,
olFolder.StoreID, System.Reflection.Missing.Value);

Thanks heaps guys for your valuable response.

Cheers,
MA
 
Thanks Ken and Dmitry for your response.
How exactly do you construct teh folder path?

I use MAPIFolder.FullFolderPath property:
rdoSession.GetFolderFromPath(olFolder.FullFolderPath)

You are spot on Dmitry about the flag in GetFolderFromID() method.
After using the Missing.Value flag, I can create messages in that
folder. I think Redemption docs need be bit clear about the flag.

RDOFolder rdofolder = rdoSession.GetFolderFromID(olFolder.EntryID,
olFolder.StoreID, System.Reflection.Missing.Value);

Thanks heaps guys for your valuable response.

Cheers,
MA
 
For the other question, you could do something similar to what I do when I
play with text intended for XML or a file name, I run the code through a
sanity check procedure that makes sure any text is legal and formatted
correctly.

For example, replace all "&" characters with "&" for XML or replacing
all "/" characters with "-" for file names, etc.
 
Back
Top