 |
|
|
|
| Author |
Message |
"Werner_Faßbender
Joined: 09 Jan 2008 Posts: 11
|
Posted: Sat Jan 26, 2008 8:05 pm Post subject: Make a new contakt folder visible in the contact view |
|
|
Hello,
I'm using OL2003, AC97, WinXP
when I store a new contact folder from AC97 via VBA this folder is
visible in OL only in the "folderview".
But I would like to make it automatic visible in the contact view for
the users.
How can I make the new folder automatic visible in the conatct view?
Tanks a lot
best regards
Werner
(under pressure)
Archived from group: microsoft>public>office>developer>outlook>vba |
|
| Back to top |
|
 |
Sue Mosher [MVP-Outlook]
Joined: 12 Aug 2007 Posts: 656
|
Posted: Sun Jan 27, 2008 12:46 am Post subject: Re: Make a new contakt folder visible in the contact view |
|
|
Could you explain, please, what you mean by the "contact view"?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Werner Faßbender" wrote in message @j78g2000hsd.googlegroups.com...
> Hello,
>
> I'm using OL2003, AC97, WinXP
>
> when I store a new contact folder from AC97 via VBA this folder is
> visible in OL only in the "folderview".
>
> But I would like to make it automatic visible in the contact view for
> the users.
>
> How can I make the new folder automatic visible in the conatct view?
>
> Tanks a lot
> best regards
>
> Werner
> (under pressure) |
|
| Back to top |
|
 |
"Werner_Faßbender
Joined: 09 Jan 2008 Posts: 11
|
Posted: Sun Jan 27, 2008 11:46 am Post subject: Re: Make a new contakt folder visible in the contact view |
|
|
> Could you explain, please, what you mean by the "contact view"?
>
When I start OL in the main window on its left hand side (in my
german version its called "fodlerlist") there are some buttons named:
"E-MAIL", calendar, contacts, tasks/duties??, notice and a folder
treeview.
When I click one the button (contacts) the contact program appear and
of the left hand side of the contact window there is a smal window
named "my contacts" showing the contact folders. --> in this view "my
contacts" I would show automatic my new contact folder "Ramigos". But
in this view my new contact folder "Ramigos" doesn't appers.
But my new contact folder "Ramigos" isn't visible when I click the
button contacts. It is only visible in the folder treeview as an
subfolder of the contact folder.
But this is only for the first time. When I click on the folder
treeview and open my new contact folder "Ramigos" and I close this
folder then this new folder appers when I click on the button
contacts.
How can I make the new contact folder "Ramigos" automatic visible in
the conatct view when I click on the button contacts an the contact
program start?
Thanks a lot and best regards
Werner |
|
| Back to top |
|
 |
Sue Mosher [MVP-Outlook]
Joined: 12 Aug 2007 Posts: 656
|
Posted: Mon Jan 28, 2008 7:09 pm Post subject: Re: Make a new contakt folder visible in the contact view |
|
|
Please show the code you're using to create the folder. I can't duplicate your scenario. A new contacts folder that I create with the MAPIFolder.Folders.Add method always shows up in the Contacts navigation pane automatically.
Outlook 2003 has no methods for controlling what folders are listed under My Contacts.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Werner Faßbender" wrote in message @e25g2000prg.googlegroups.com...
>> Could you explain, please, what you mean by the "contact view"?
>>
>
> When I start OL in the main window on its left hand side (in my
> german version its called "fodlerlist") there are some buttons named:
> "E-MAIL", calendar, contacts, tasks/duties??, notice and a folder
> treeview.
>
> When I click one the button (contacts) the contact program appear and
> of the left hand side of the contact window there is a smal window
> named "my contacts" showing the contact folders. --> in this view "my
> contacts" I would show automatic my new contact folder "Ramigos". But
> in this view my new contact folder "Ramigos" doesn't appers.
>
> But my new contact folder "Ramigos" isn't visible when I click the
> button contacts. It is only visible in the folder treeview as an
> subfolder of the contact folder.
>
> But this is only for the first time. When I click on the folder
> treeview and open my new contact folder "Ramigos" and I close this
> folder then this new folder appers when I click on the button
> contacts.
>
> How can I make the new contact folder "Ramigos" automatic visible in
> the conatct view when I click on the button contacts an the contact
> program start?
>
> when I store a new contact folder from AC97 via VBA this folder is
> visible in OL only in the "folderview".
>
> But I would like to make it automatic visible in the contact view for
> the users.
>
> How can I make the new folder automatic visible in the conatct view?
"Werner Faßbender" wrote in message @j78g2000hsd.googlegroups.com...
> Hello,
>
> I'm using OL2003, AC97, WinXP
>
> when I store a new contact folder from AC97 via VBA this folder is
> visible in OL only in the "folderview".
>
> But I would like to make it automatic visible in the contact view for
> the users.
>
> How can I make the new folder automatic visible in the conatct view? |
|
| Back to top |
|
 |
"Werner_Faßbender
Joined: 09 Jan 2008 Posts: 11
|
Posted: Tue Jan 29, 2008 7:36 pm Post subject: Re: Make a new contakt folder visible in the contact view |
|
|
> Please show the code you're using to create the folder. I can't duplicate your scenario. A new contacts folder that I create with the MAPIFolder.Folders.Add method always shows up in the Contacts navigation pane automatically.
hier my code to create a new contact folder:
the name of the new contact folder is: "RAMIGOS"
------------------------------------------------------------------------
Public Function BuildFolder() As Boolean
Dim fdsContsPO As Outlook.MAPIFolder
Dim fdsContsKO As Outlook.MAPIFolder
Dim oFld As Outlook.MAPIFolder
Dim oFldSub As Outlook.MAPIFolder
Dim myNameSpace As Outlook.NameSpace
BuildFolder = False
'Reference the default Public folder.
Set myNameSpace = myolApp.GetNamespace("MAPI")
Set fdsContsPO = myNameSpace.Folders("Persönliche Ordner")
Set fdsContsKO = fdsContsPO.Folders("Kontakte")
'***** If the contact folder: "RAMIGOS" exists delete it first
For Each oFld In fdsContsPO.Folders
If oFld.Name = "RAMIGOS" Then
'Ordner schon vorhanden löschen
oFld.Delete
Else
'Unterordner des Hauptordners durchsuchen nur wenn er
oben nicht gelsöcht wurde
Set fdsContsKO = fdsContsPO.Folders(oFld.Name)
For Each oFldSub In fdsContsKO.Folders
If InStr(1, oFldSub.Name, "RAMIGOS") > 0 Then
'Ordner schon vorhanden löschen
oFldSub.Delete
End If
Next
End If
Next
'*************************************************************************************
'* build a the new folder: RAMIGOS as a contact folder
'*************************************************************************************
Dim myFolder As Outlook.MAPIFolder
Dim myNewFolder As Outlook.MAPIFolder
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myFolder.Folders.Add("RAMIGOS")
'*************************************************************************************
BuildFolder = True
routine_exit:
If Not fdsContsKO Is Nothing Then Set fdsContsKO = Nothing
If Not fdsContsPO Is Nothing Then Set fdsContsPO = Nothing
If Not oFld Is Nothing Then Set oFld = Nothing
If Not oFldSub Is Nothing Then Set oFldSub = Nothing
If Not myNameSpace Is Nothing Then Set myNameSpace = Nothing
If Not myFolder Is Nothing Then Set myFolder = Nothing
If Not myNewFolder Is Nothing Then Set myNewFolder = Nothing
Exit Function
routine_err:
Select Case Err
Case Is < 0 '*** Folder exits
Resume Next
Case Else
MsgBox Err & " " & Err.Description & " " &
Application.CurrentObjectName
Call SubWriteLog("fncReSo", Err.Number & " " &
Err.Description & " " & Application.CurrentObjectName)
Resume routine_exit
Resume
End Select
End Function
----------------- END -----------------------------
Thanks a lot and best regards
Werner |
|
| Back to top |
|
 |
Ken Slovak - [MVP - Outlo
Joined: 12 Aug 2007 Posts: 405
|
Posted: Wed Jan 30, 2008 2:02 pm Post subject: Re: Make a new contakt folder visible in the contact view |
|
|
Use the Type argument when you call Folders.Add to add a contacts folder and
not a mail folder.
--
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
"Werner Faßbender" wrote in message @h11g2000prf.googlegroups.com...
> Please show the code you're using to create the folder. I can't duplicate
> your scenario. A new contacts folder that I create with the
> MAPIFolder.Folders.Add method always shows up in the Contacts navigation
> pane automatically.
hier my code to create a new contact folder:
the name of the new contact folder is: "RAMIGOS"
------------------------------------------------------------------------
Public Function BuildFolder() As Boolean
Dim fdsContsPO As Outlook.MAPIFolder
Dim fdsContsKO As Outlook.MAPIFolder
Dim oFld As Outlook.MAPIFolder
Dim oFldSub As Outlook.MAPIFolder
Dim myNameSpace As Outlook.NameSpace
BuildFolder = False
'Reference the default Public folder.
Set myNameSpace = myolApp.GetNamespace("MAPI")
Set fdsContsPO = myNameSpace.Folders("Persönliche Ordner")
Set fdsContsKO = fdsContsPO.Folders("Kontakte")
'***** If the contact folder: "RAMIGOS" exists delete it first
For Each oFld In fdsContsPO.Folders
If oFld.Name = "RAMIGOS" Then
'Ordner schon vorhanden löschen
oFld.Delete
Else
'Unterordner des Hauptordners durchsuchen nur wenn er
oben nicht gelsöcht wurde
Set fdsContsKO = fdsContsPO.Folders(oFld.Name)
For Each oFldSub In fdsContsKO.Folders
If InStr(1, oFldSub.Name, "RAMIGOS") > 0 Then
'Ordner schon vorhanden löschen
oFldSub.Delete
End If
Next
End If
Next
'*************************************************************************************
'* build a the new folder: RAMIGOS as a contact folder
'*************************************************************************************
Dim myFolder As Outlook.MAPIFolder
Dim myNewFolder As Outlook.MAPIFolder
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myFolder.Folders.Add("RAMIGOS")
'*************************************************************************************
BuildFolder = True
routine_exit:
If Not fdsContsKO Is Nothing Then Set fdsContsKO = Nothing
If Not fdsContsPO Is Nothing Then Set fdsContsPO = Nothing
If Not oFld Is Nothing Then Set oFld = Nothing
If Not oFldSub Is Nothing Then Set oFldSub = Nothing
If Not myNameSpace Is Nothing Then Set myNameSpace = Nothing
If Not myFolder Is Nothing Then Set myFolder = Nothing
If Not myNewFolder Is Nothing Then Set myNewFolder = Nothing
Exit Function
routine_err:
Select Case Err
Case Is < 0 '*** Folder exits
Resume Next
Case Else
MsgBox Err & " " & Err.Description & " " &
Application.CurrentObjectName
Call SubWriteLog("fncReSo", Err.Number & " " &
Err.Description & " " & Application.CurrentObjectName)
Resume routine_exit
Resume
End Select
End Function
----------------- END -----------------------------
Thanks a lot and best regards
Werner
|
|
| Back to top |
|
 |
|
|
| Related Topics: | CommandBar Visible and Enable Properties are slow? I've gotten ALOT of help from this group so far and hopefully this will wrap up this project. Thanks! Ken helped me setup a new Inspector to fire with each new MailItem object so I can set up the commandbars. Everything is working great and I wanted to ma
User defiend field must be not visible for the users Hello, I'm using OL2003, AC97, Win XP I would like to switch a user defined field to unvisible for the user. The reason is, I need a field where I can store a key. It must be unpossible for the user to change or delete this field. This code example..: Set
Outlook contacts: "user defined folderfields??" to make publ I'm working with Access97, Outlook 2003, XP My problem is in a contact the "user defined to make public under "user defined fields in this element??" (I do not know the exact english translation for this to expressions.) From AC97 VBA I t
Retrieve Contact info from Business Contact Manager How do I retrieve and place contact information and other data from Business Contact Manager from another application like word or preferabaly visual studio office tools? And why is the information only meant for 1 person, if it is stored in a MSDE? If
Customize the monthly view of the calendar In the montly view of the calendar, I appreciate to have on the right side the tasks list and the around months. I haven't found how to memorize this customized view. Is anybody has an idea to fix this presention by VBA and to automatically get this one w |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|