A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Problem with MapiTable and OL2000



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 1st 07, 05:23 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 116
Default Problem with MapiTable and OL2000

Hello,

I try to use the MapiTable object in OL 2000, but get an error on the
ExecSQL statement: "HrGetPropTag: MAPIProp == NULL". Same code on
2002/2003 works without error, so I don`t know where to search. Does
MapiTables not work on 2000?

I tried it with an exchange post box and with a pst file - same
result.

Here is the code:

Public Sub GetDaslProperty()

Const DASLGUID As String = "{41B067EB-BDC6-472C-8989-
BAC7B8F788EE}"
Const DASLPROPERTY As String = "http://schemas.microsoft.com/mapi/
string/" & DASLGUID & "/" & "Test"

Dim objTable As Object
Dim objRecordset As Object

Dim strSQL As String

Set objTable = CreateObject("Redemption.MAPITable")

objTable.Item =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items

strSQL = "SELECT """ & DASLPROPERTY & """ FROM Folder"

Set objRecordset = objTable.ExecSQL(strSQL)

End Sub

Redemption version is 4.5.0.730

Thanks for answers!

Peter

Ads
  #2  
Old October 1st 07, 06:04 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Problem with MapiTable and OL2000

How are you assigning the RDOSession object, are you using
NameSpace.MAPIOBJECT? That doesn't exist in Outlook 2000, there you have to
use RDOSession.Logon.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message
ps.com...
Hello,

I try to use the MapiTable object in OL 2000, but get an error on the
ExecSQL statement: "HrGetPropTag: MAPIProp == NULL". Same code on
2002/2003 works without error, so I don`t know where to search. Does
MapiTables not work on 2000?

I tried it with an exchange post box and with a pst file - same
result.

Here is the code:

Public Sub GetDaslProperty()

Const DASLGUID As String = "{41B067EB-BDC6-472C-8989-
BAC7B8F788EE}"
Const DASLPROPERTY As String = "http://schemas.microsoft.com/mapi/
string/" & DASLGUID & "/" & "Test"

Dim objTable As Object
Dim objRecordset As Object

Dim strSQL As String

Set objTable = CreateObject("Redemption.MAPITable")

objTable.Item =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items

strSQL = "SELECT """ & DASLPROPERTY & """ FROM Folder"

Set objRecordset = objTable.ExecSQL(strSQL)

End Sub

Redemption version is 4.5.0.730

Thanks for answers!

Peter


  #3  
Old October 1st 07, 06:24 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 116
Default Problem with MapiTable and OL2000

Hmm, have I forgot something? Do I need a RDOSession for MapiTables?

Peter

On 1 Okt., 18:04, "Ken Slovak - [MVP - Outlook]"
wrote:
How are you assigning the RDOSession object, are you using
NameSpace.MAPIOBJECT? That doesn't exist in Outlook 2000, there you have to
use RDOSession.Logon.

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm

"Peter Marchert" wrote in message

ps.com...



Hello,


I try to use the MapiTable object in OL 2000, but get an error on the
ExecSQL statement: "HrGetPropTag: MAPIProp == NULL". Same code on
2002/2003 works without error, so I don`t know where to search. Does
MapiTables not work on 2000?


I tried it with an exchange post box and with a pst file - same
result.


Here is the code:


Public Sub GetDaslProperty()


Const DASLGUID As String = "{41B067EB-BDC6-472C-8989-
BAC7B8F788EE}"
Const DASLPROPERTY As String = "http://schemas.microsoft.com/mapi/
string/" & DASLGUID & "/" & "Test"


Dim objTable As Object
Dim objRecordset As Object


Dim strSQL As String


Set objTable = CreateObject("Redemption.MAPITable")


objTable.Item =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items


strSQL = "SELECT """ & DASLPROPERTY & """ FROM Folder"


Set objRecordset = objTable.ExecSQL(strSQL)


End Sub


Redemption version is 4.5.0.730


Thanks for answers!


Peter- Zitierten Text ausblenden -


- Zitierten Text anzeigen -



  #4  
Old October 1st 07, 07:18 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Problem with MapiTable and OL2000

The problem here is that if you are using the standalone
Redemption.MAPITable object (rather than RDOItems.MAPITable property) and
assign its Item property to an instance of the Outlook.Items object,
Redemption will need to convert the named property GUID/id to a 4 bytes int
tag using IMAPIProps::GetIDsFromNames. To do that, it will attempt to query
the Parent property of the object assigned to the Item property (for the
Outlook.Items object Parent property will return Outlook.MAPIFolder), and
try to retrieve the IMAPIFolder Extended MAPI object from the MAPIOBJECT
property. The problem here is that Outlook.MAPIFolder object added the
MAPIOBJECT property in Outlook 2002.
You can work around this by opening a message (any message) from that folder
and using MAPIUtils or SafeMailItem object to call GetIdsFromNames and
hardcode the tag in the form like

http://schemas.microsoft.com/mapi/proptag/0x85990003

You will essentially treat a named property as a regular property and
handcode its value.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Peter Marchert" wrote in message
oups.com...
Hmm, have I forgot something? Do I need a RDOSession for MapiTables?

Peter

On 1 Okt., 18:04, "Ken Slovak - [MVP - Outlook]"
wrote:
How are you assigning the RDOSession object, are you using
NameSpace.MAPIOBJECT? That doesn't exist in Outlook 2000, there you have
to
use RDOSession.Logon.

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment
Optionshttp://www.slovaktech.com/products.htm

"Peter Marchert" wrote in message

ps.com...



Hello,


I try to use the MapiTable object in OL 2000, but get an error on the
ExecSQL statement: "HrGetPropTag: MAPIProp == NULL". Same code on
2002/2003 works without error, so I don`t know where to search. Does
MapiTables not work on 2000?


I tried it with an exchange post box and with a pst file - same
result.


Here is the code:


Public Sub GetDaslProperty()


Const DASLGUID As String = "{41B067EB-BDC6-472C-8989-
BAC7B8F788EE}"
Const DASLPROPERTY As String = "http://schemas.microsoft.com/mapi/
string/" & DASLGUID & "/" & "Test"


Dim objTable As Object
Dim objRecordset As Object


Dim strSQL As String


Set objTable = CreateObject("Redemption.MAPITable")


objTable.Item =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items


strSQL = "SELECT """ & DASLPROPERTY & """ FROM Folder"


Set objRecordset = objTable.ExecSQL(strSQL)


End Sub


Redemption version is 4.5.0.730


Thanks for answers!


Peter- Zitierten Text ausblenden -


- Zitierten Text anzeigen -





  #5  
Old October 1st 07, 08:00 PM posted to microsoft.public.outlook.program_vba
Peter Marchert
external usenet poster
 
Posts: 116
Default Problem with MapiTable and OL2000

Thanks, Dmirty. The workaround seems for me to complicated so I will
create RDOFolderItems and use these.

Thanks, Ken, too.

Peter

On 1 Okt., 19:18, "Dmitry Streblechenko" wrote:
The problem here is that if you are using the standalone
Redemption.MAPITable object (rather than RDOItems.MAPITable property) and
assign its Item property to an instance of the Outlook.Items object,
Redemption will need to convert the named property GUID/id to a 4 bytes int
tag using IMAPIProps::GetIDsFromNames. To do that, it will attempt to query
the Parent property of the object assigned to the Item property (for the
Outlook.Items object Parent property will return Outlook.MAPIFolder), and
try to retrieve the IMAPIFolder Extended MAPI object from the MAPIOBJECT
property. The problem here is that Outlook.MAPIFolder object added the
MAPIOBJECT property in Outlook 2002.
You can work around this by opening a message (any message) from that folder
and using MAPIUtils or SafeMailItem object to call GetIdsFromNames and
hardcode the tag in the form like

http://schemas.microsoft.com/mapi/proptag/0x85990003

You will essentially treat a named property as a regular property and
handcode its value.

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Peter Marchert" wrote in message

oups.com...



Hmm, have I forgot something? Do I need a RDOSession for MapiTables?


Peter


On 1 Okt., 18:04, "Ken Slovak - [MVP - Outlook]"
wrote:
How are you assigning the RDOSession object, are you using
NameSpace.MAPIOBJECT? That doesn't exist in Outlook 2000, there you have
to
use RDOSession.Logon.


--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment
Optionshttp://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message


oups.com...


Hello,


I try to use the MapiTable object in OL 2000, but get an error on the
ExecSQL statement: "HrGetPropTag: MAPIProp == NULL". Same code on
2002/2003 works without error, so I don`t know where to search. Does
MapiTables not work on 2000?


I tried it with an exchange post box and with a pst file - same
result.


Here is the code:


Public Sub GetDaslProperty()


Const DASLGUID As String = "{41B067EB-BDC6-472C-8989-
BAC7B8F788EE}"
Const DASLPROPERTY As String = "http://schemas.microsoft.com/mapi/
string/" & DASLGUID & "/" & "Test"


Dim objTable As Object
Dim objRecordset As Object


Dim strSQL As String


Set objTable = CreateObject("Redemption.MAPITable")


objTable.Item =
Outlook.Session.GetDefaultFolder(olFolderCalendar) .Items


strSQL = "SELECT """ & DASLPROPERTY & """ FROM Folder"


Set objRecordset = objTable.ExecSQL(strSQL)


End Sub


Redemption version is 4.5.0.730


Thanks for answers!


Peter- Zitierten Text ausblenden -


- Zitierten Text anzeigen -- Zitierten Text ausblenden -


- Zitierten Text anzeigen -



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with MapiTable and EntryID/StoreID Peter Marchert Outlook and VBA 29 August 20th 07 08:29 AM
SQL filters with MAPITABLE DENNIS BROWN Outlook and VBA 1 July 21st 07 10:50 PM
How do I get a propertyvalue from a mapitable [email protected] Outlook and VBA 1 October 4th 06 07:51 PM
Redemption - MapiTable : BusyStatus Tadwick Outlook and VBA 4 August 10th 06 07:36 PM
Redemption MAPITable Dmitry Streblechenko Add-ins for Outlook 1 January 12th 06 05:09 AM


All times are GMT +1. The time now is 08:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.