Problems with the outlook view control under outlook 2000

M

Martin

Hi,

i have a Problem with the OVC. I want to display restricted items which are
stored in a other public folder as the "main item" in which is the view
embedded.
The "main item" (a contact item too) sould be stored in \public
Folder\Contacts\ - but at the moment in my personal contact
The routine destroy's my outlook so that i have to restart outlook.

Does anybody have some hints?

Thx Martin
martini ( a t) gmx (d ot)de


here's my code:

Function ViewControl_initialize()
Dim folThis, gobjPageGeneral, ctlViewContacts, olAppl, olNS, MyItems,
MyItem, strRestrict
' On Error Resume Next
Set gobjPageGeneral = Item.GetInspector.ModifiedFormPages("Contract")
Set ctlViewContacts = gobjPageGeneral.Controls("ctlViewContacts")
Set folThis = Item.Application.GetNameSpace("MAPI").Folders("Öffentliche
Ordner").Folders("Alle Öffentlichen Ordner").Folders("Contracts")

ctlViewContacts.Namespace = Application.GetNameSpace("MAPI")
ctlViewContacts.Folder = "\\Öffentliche Ordner\Alle Öffentlichen
Ordner\Contracts"
ctlViewContacts.View = "Vertragsansicht komplett"
ctlViewContacts.LayoutFlags =68
strRestrict = "[guidparent]= '" & Item.UserProperties.Find("guid").Value &
"'"
ctlViewContacts.Restriction = strRestrict

Set gobjPageGeneral = Nothing
.....
End Function
 
M

Martin

It works!

I removed the ctlViewContacts.LayoutFlags and one backslash from the folder.

Does anybody has a description about the Propertries like LayoutFlags?

Thx Martin
 
S

Sue Mosher [MVP-Outlook]

LayoutFlags is generally a no-no, because it one-offs the item. Don't use
it.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Martin said:
It works!

I removed the ctlViewContacts.LayoutFlags and one backslash from the folder.

Does anybody has a description about the Propertries like LayoutFlags?

Thx Martin


Martin said:
Hi,

i have a Problem with the OVC. I want to display restricted items which are
stored in a other public folder as the "main item" in which is the view
embedded.
The "main item" (a contact item too) sould be stored in \public
Folder\Contacts\ - but at the moment in my personal contact
The routine destroy's my outlook so that i have to restart outlook.

Does anybody have some hints?

Thx Martin
martini ( a t) gmx (d ot)de


here's my code:

Function ViewControl_initialize()
Dim folThis, gobjPageGeneral, ctlViewContacts, olAppl, olNS, MyItems,
MyItem, strRestrict
' On Error Resume Next
Set gobjPageGeneral = Item.GetInspector.ModifiedFormPages("Contract")
Set ctlViewContacts = gobjPageGeneral.Controls("ctlViewContacts")
Set folThis = Item.Application.GetNameSpace("MAPI").Folders("Öffentliche
Ordner").Folders("Alle Öffentlichen Ordner").Folders("Contracts")

ctlViewContacts.Namespace = Application.GetNameSpace("MAPI")
ctlViewContacts.Folder = "\\Öffentliche Ordner\Alle Öffentlichen
Ordner\Contracts"
ctlViewContacts.View = "Vertragsansicht komplett"
ctlViewContacts.LayoutFlags =68
strRestrict = "[guidparent]= '" & Item.UserProperties.Find("guid").Value &
"'"
ctlViewContacts.Restriction = strRestrict

Set gobjPageGeneral = Nothing
....
End Function
 

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