Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / June 2006

Tip: Looking for answers? Try searching our database.

Outlook 2002 (XP) - MAPIFolder.Description - Runtime Error -2113470450

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johannes Harth - 23 Jun 2006 21:07 GMT
Hi

I am trying to get the Description of a Folder using the Description
Property of a MAPIFolder Object.

Every newly created Folder has no Description property set by default.
As a result of that I'll get a runtime error -2113470450. I have a
German version of outlook so i translated the error message with google
translate. So it could be possible that it sounds slightly different
then the original English message.

EN "Not sufficient main memory or system resources. Close some windows
or programs and try it again."

DE "Nicht genügend Arbeitsspeicher oder Systemressourcen. Schließen Sie
einige Fenster oder Programme und versuchen Sie es erneut."

I also figured out that the Folder has no property "PR_COMMENT" set.

Is there a way in vba to check whether a folder has a comment applied to
it or not?

here is an example code for testing:

Sub MAPIFolderTest()
    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    Set myCalendar = myNameSpace.GetDefaultFolder(olFolderCalendar)
    Set myExplorer = myOlApp.ActiveExplorer

    Debug.Print "Description of Default Calendar:" & _
        vbTab & myCalendar.Description
    Debug.Print "Description of Selected Folder:" & _
        vbTab & vbTab & myExplorer.CurrentFolder.Description
End Sub

Any help greatly appreciated
Joe
Sue Mosher [MVP-Outlook] - 27 Jun 2006 22:32 GMT
You could use CDO to check for the presence of the PR_COMMENT property. See http://www.cdolive.com/cdo10.htm if you're not familiar with MAPI property syntax.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

> Hi
>
[quoted text clipped - 34 lines]
> Any help greatly appreciated
> Joe
Johannes Harth - 30 Jun 2006 21:21 GMT
Thanks a lot Sue, I now have chosen a on error resume next construct to
catch that error. The reason for that is that I also would rise up an
error by reading a property via CDO without value. I could not find a
solution without rising an error.

As a result of that I now have a new question. How can I restore the
normal environment for error handling after writing the on error resume
next statement.
If any further errors would arise they just would be skipped without a
error msg. I would only like to have my application to behave so in a
few lines.

debugging would get extremely hard...

Kind regards, Johannes

> You could use CDO to check for the presence of the PR_COMMENT property. See http://www.cdolive.com/cdo10.htm if you're not familiar with MAPI property syntax.
Sue Mosher [MVP-Outlook] - 30 Jun 2006 21:34 GMT
On Error Goto 0

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

> Thanks a lot Sue, I now have chosen a on error resume next construct to
> catch that error. The reason for that is that I also would rise up an
[quoted text clipped - 13 lines]
>
>> You could use CDO to check for the presence of the PR_COMMENT property. See http://www.cdolive.com/cdo10.htm if you're not familiar with MAPI property syntax.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.