Default Contacts folder

Status
Not open for further replies.

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
I have three PCs where I'm syncing the calendar and contacts using CodeTwo Public Folders (see http://www.codetwo.com/public-folders/). On the two client systems when I open Outlook (2010 and 2013) and click on the Calendar I automatically open the shared Calendar (this is what I want) but when I open the Contacts it defaults to the Contacts folder on that PC. How do I get Outlook to open the Shared Contact folder on that PC as the default?

Example: On my wife's PC (she just has the Client version of CodeTwo Public Folders installed) when I click on icon for Contacts in the view that opens in the left nav pane I see under My Contacts (1) "John's Contacts" (this is the shared folder) followed by (2) "Contacts - Outlook" and it has defaulted to the second entry. I want it to default to "John's Contacts"

I've searched the web for a solution but so far all the suggestions I have found do not work for me, possibly I'm doing something wrong.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
What solutions did you try? The only way I know to open the Contacts folder to that folder is by using a macro. I have a macro here - http://www.slipstick.com/outlook/tasks/remove-todo-list-tasks-list-outlook/ - that can easily be tweaked to work with contacts.

Setting it as the default for the address book is doable, so it is the first one when you click the To button. Ctrl+Shift+B to open the Address book then Tools menu - it the bottom option.
 

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
One of the suggested solutions I tried was at https://support.appriver.com/kb/a131/changing-your-default-contact-list-in-outlook.aspx I saw this as a suggestion in several different websites but this does not work to set the contacts folder that is opened by default. I do have "John's Contacts" as the first item in the nav pane (the second item is "Contacts - Outlook" but when I click on the People icon the "Contacts - Outlook" opens.

I looked at the macro but currently it is over my head. :)
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
That sets the default "Address Book" that you see when you click To while addressing a message. Changing it when you switch navigation panes requires a macro.

Change the 4 lines marked with small arrows and the item # then click in Application startup and press Run. (triangle button in toolbar). Switch folders to test. If you select a different folder then switch to inbox and back, the folder in this code is selected.

contacts-pane.png


You can also set outlook to start in any folder, but most people want the inbox visible when they first open outlook, not contacts.
 

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
I agree I do NOT want to start with a folder other than the inbox. Once Outlook is opened I what to be able to click on the icons in the nav pane to bounce between the mail, contacts and calendar (currently this is all that we use).

I have no idea what the heck I'm doing wrong but I cannot get it to work. I'm attempting to follow the instructions on the page at http://www.slipstick.com/outlook/tasks/remove-todo-list-tasks-list-outlook but it is not working for me. Almost immediately I'm lost. I need the micro-step description.
  1. I opened Outlook 2010 on my laptop
  2. I clicked the developer tab
  3. Clicked Macros, selected macros
  4. For the Macro Name I entered ThisOutlookSession (there are no macros) and clicked the edit button (I get msg "Sub or function not defined). I have no idea what this means, I click the OK button
  5. In your example at http://www.slipstick.com/outlook/tasks/remove-todo-list-tasks-list-outlook/ the VCA window title is "Microsoft Visual Basic for Applications - VbaProject.OTM - [ThisOutlloSession (Code)]" the title in my window is "Miacrosoft Visual Basic for Applications - VbaProject.OTM"
  6. At this point I assume I'm doing something wrong.
In my macro window I see the following.
Sub ThisOutlookSession()
Dim WithEvents objPane As NavigationPane
Private Sub Application_Startup()
Set objPane = Application.ActiveExplorer.NavigationPane
End Sub
Private Sub objPane_ModuleSwitch(ByVal CurrentModule As NavigationModule)
Dim objModule As ContactsModule
Dim objGroup As NavigationGroup
Dim objNavFolder As NavigationFolder
If CurrentModule.NavigationModuleType = olModuleContacts Then
Set objModule = objPane.Modules.GetNavigationModule(olModuleContacts)
Set objGroup = objModule.NavigationGroups("John's Contacts")

' Change the 1 to start in a different folder
Set objNavFolder = objGroup.NavigationFolders.Item(1)
objNavFolder.IsSelected = True
End If
Set objNavFolder = Nothing
Set objGroup = Nothing
Set objModule = Nothing
End Sub
End Sub
I've attached an image of my editor window.
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Delete this line: Sub ThisOutlookSession()

It belongs in the ThisOutlookSession module.

Screenshot: http://screencast.com/t/vlK3hdwpg

Quickie video - no sound because everyone is asleep -
http://www.screencast.com/t/vgYOT6bRs - when macro quit just after the line with John's Contacts in it, i paused the recording and added a 3rd contacts folder before changing the name to match my group name (My Contacts) so you could see it work.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
If this is the only macro, close outlook then type or paste
%appdata%\microsoft\outlook
in the address bar of windows explorer and press enter - delete project1.otm and restart outlook. This will reset the the panes - you have one closed on the left side. It'll make it easier to open thisoutlooksession. If you have other macros, turn it on using View > Project Explorer or Ctrl+R
 

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
I've made some progress but still I cannot capture the brass ring. DARN!
In order to see ThisOutlookSession I must click on the Project Explorer icon or press Ctrl+R . I then double-clicked on ThisOutlookSession and a window opened on the right side. I then pasted the code into the window and I see the following (Outlook VB 01.png).

In your video I noticed that when you clicked on the run icon something did run but when I click on the run button I get a pop-up requesting the macro I want to run (see the image Run Marco Prompt.png

I've tried changing Set objGroup = objModule.NavigationGroups("John's Contacts") and number in Set objNavFolder = objGroup.NavigationFolders.Item(1) but nothing seems to work.

I deleted VbaProject.OTM as you suggested, this just deleted the contents of ThisOutlookSession. I reentered the code and get the same error. BTW the VbaProject.OTM file reappears.

I'm running Win8.1, Office 2010 x32 on the system I've been trying to get to work.

I just tried the same on my wife's PC and it worked one session! I closed/reopened Outlook (1) it did not work (2) now at the top of the contact list I now have "My Contacts" followed by John Contacts (I renamed it as a test and updated the VBA), followed by Contacts.

When you got it to work did you close/reopen Outlook and did it still work?

Sorry to be so obtuse but I keep hitting the wall.
 

Attachments

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
Quick update - On my wife's system the "My Contacts" is the root level and under that I have "John Contacts" and "Contacts". Originally outlook was not displaying the root level. However when I close/reopen Outlook it does not default to "John Contacts" - see the following KMT Outlook 01.png image
 

Attachments

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
Also on my wife's system when I have the VBA editor open and click the Run button I get prompted for the macro name.
On this PC I have Win8.1 x64, Office 2013 x32.
 

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
I think I found one of my errors but still no brass ring. In the following
Set objGroup = objModule.NavigationGroups("My Contacts")
The NavigationGroups really should be "My Contacts"

It just hit me that the item is the group name and not the Folder name. However still no brass ring. In that this is a shared folder on another PC might this be an issue, see the KMT JT Contacts Prop.png image.

Another question - Note in the properties image I've selected "Show total number of items", I also selected this option for the Contacts folder as well. However the setting does not stick, when I close/open outlook I will not see the number of items displayed. I don't think this is an issue due to the shared folder because on my desktop I have a folder named "PM Contacts" and I have selected this option but the number of contacts is not showing. If I change to the other option and back then it will display the number of contacts but it is highly likely that the next time I open outlook the number of contacts will not be displayed.
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Also on my wife's system when I have the VBA editor open and click the Run button I get prompted for the macro name.
On this PC I have Win8.1 x64, Office 2013 x32.
This usually means you didn't click in the macro you want to run. Or it's one you can't run from the editor and need to call from another macro.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I've made some progress but still I cannot capture the brass ring. DARN!
In order to see ThisOutlookSession I must click on the Project Explorer icon or press Ctrl+R . I then double-clicked on ThisOutlookSession and a window opened on the right side. I then pasted the code into the window and I see the following (Outlook VB 01.png).

In your video I noticed that when you clicked on the run icon something did run but when I click on the run button I get a pop-up requesting the macro I want to run (see the image Run Marco Prompt.png
It looks like you are 1 row too high. :) click on Private or the line under Private.

Outlook VB 01.png



I've tried changing Set objGroup = objModule.NavigationGroups("John's Contacts") and number in Set objNavFolder = objGroup.NavigationFolders.Item(1) but nothing seems to work.
I see you figured this one out - you need to use the Group name.

When you got it to work did you close/reopen Outlook and did it still work?
Yes, it did.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Another question - Note in the properties image I've selected "Show total number of items", I also selected this option for the Contacts folder as well. However the setting does not stick, when I close/open outlook I will not see the number of items displayed. I don't think this is an issue due to the shared folder because on my desktop I have a folder named "PM Contacts" and I have selected this option but the number of contacts is not showing. If I change to the other option and back then it will display the number of contacts but it is highly likely that the next time I open outlook the number of contacts will not be displayed.
I'm guessing this is related to CodeTwo folders. The only time I've seen setting not stick was if Windows installed an update or you clicked ok on one dialog then cancel on the parent dialog to close it. This one doesn't have a parent dialog so its not that.
 

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
I think I'm doing something wrong but I'm lost as to what.
On my desktop which is the master for CodeTwo folders I have two folders under My Contacts, e.g. Contacts and PM Contacts.
  1. I created the macro and attempted to default clicking on People to bring up the PM Contacts. No matter what number I put for objGroup.NavigationFolders.Item it defaults to Contacts, e.g. the first one in the list.
  2. Clicking on the Run button in the VBA window still brings up the pop-up for the macro name
  3. I clicked on Properties for both folders (Contacts and PM Contacts) and selected "Show total number of items" and the number is displayed for each folder. I close/reopen outlook and only the first folder shows the number of items. Currently the PM Contacts is not shared out via CodeTwo. Currently only the Calendar and Contacts are being shared via CodeTwo.
This system (my desktop) is running Win8.1 x64, Office 2013 x32
FYI CodeTwo involves two installs
  1. Master - this is only installed on one system. For me this is my desktop known as S4
  2. Client - this is installed on all systems that will be working with the shared folders. For my install this is installed on my Desktop (known as S4), my laptop (Known as W700) and my wife's laptop (Known as Lenovo-Z580). Potentially I can share any outlook folder as well as any folder on my PC via the CodeTwo install. Because my systems are on a local network I don't plan to use the PC shared folders function. However I may change my mind after I learn more about sharing folders. BTW CodeTwo Public Folders also provides the sharing (Outlook folders and PC folders) via the internet but I'm not using this function. The Share Files function allows the user to share any PC folder from any system. The main advantage of this function is that when anything in the folder is updated on any system all of the other systems see the update in real time.
Question - In your video which I have view numerous times :) I just noticed that when you open the VBA you right-clicked on the empty window and selected "List Properties/Methods" (see image Diane 01.png). Is this something I should have done as well?

AHHHHH I think I just found something! The macros are disable on all of my systems in Outlook (see the image KMT Macro Disabled.png). I attempted to read the help about turning it on (by clicking the Help button when the window was presented and reading http://technet.microsoft.com/en-us/library/ee857085(v=office.15).aspx#changedefault) The info just went over my head. By chance do you have instructions for dummies?

OK more searching on the web and I found some simple instructions at http://www.extendoffice.com/documents/outlook/1368-outlook-enable-disable-macros.html As it turns out I need to select "Enable all macros (not recommended; potentially dangerous code can run)" - I selected this

Darn still no brass ring but there is some progress.
  1. In the VBA window if I click on the left drop-down and select "Application" and then click on the Run button I do NOT get the pop-up requesting the Macro name.
  2. After clicking the Run button and now if I bounce between the Calendar and People in People it does default to John's Contacts
  3. However if I close/reopen outlook and then click on People it does not pick the correct folder, e.g. it has revered back. It seems that the macro is NOT running when I start Outlook.
I've got to call it quits for tonight. I need to get up in just over five hours and my old body just does not bounce back as it did when I was young.
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Question - In your video which I have view numerous times :) I just noticed that when you open the VBA you right-clicked on the empty window and selected "List Properties/Methods" (see image Diane 01.png). Is this something I should have done as well?
No, that apparently came up accidently. I'll have to watch the video again. :)

Did you restart Outlook after enabling macros? (Outlook usually tells you they are disabled when you try to one them.)


After clicking the Run button and now if I bounce between the Calendar and People in People it does default to John's Contacts
Progress. :) This is how it should be. But it definitely should run automatically when you start Outlook. That's what Application_Startup does. It sounds like we are down to figuring out why it's not running. Is the macro security resetting to signed macros only? If so, and if you are done messing with this, you can create a selfcert digital signature to sign it, but once you do you can't edit it or add more macros unless you remove the signature and resign it.
http://www.slipstick.com/developer/how-to-use-outlooks-vba-editor/#selfcert
in outlook 2013, after signing it hit Save in the VB Editor then when you close Outlook and are asked to save again, click Yes.
 

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
Did you restart Outlook after enabling macros? (Outlook usually tells you they are disabled when you try to one them.)
Yes I did restart Outlook

I'm still having an issue getting the macro to run at startup. I'm working on my desktop mainly because it is much faster than my other systems. I found one of your videos at http://www.slipstick.com/developer/how-to-use-outlooks-vba-editor/ (super) and I've watched it several times trying to see where I've made a mistake.

Is the macro security resetting to signed macros only?
I don't think so. I checked File > Options > Trust Center > Trust Center Settings > Macro Settings and it is still set to Enable all macros (did I answer your question correctly?)

Currently if I open VBA editor and change the dropdown to Application I can run (click on the run button) the macro and it works. As a test I made some changes (see S4 Test Macro 01.png). The main changes to to maximize the outlook window and to popup the message "Foo". On this system I have two contact folders under My Contacts (Contacts and PM Contacts) and after running the macro when I click on People it shows "PM Contacts" as it should.

Now if reduce the size of the Outlook window, close/restart outlook the macro does NOT run, e.g. the window does not maximize, I don't see the pop-up message and when I click on the People icon the display defaults to Contacts.

After watching you video several times I created a digital signature and applied it (see S4 Digital sig.png). I then changed the security level back to Notifications, close/reopen Outlook the macro does NOT run. If I open VBA and attempt to run the macro I get the message that macros are disabled.

From this test I assume that I did something wrong but I have no idea what that is. Again I watched the section about digital signatures and I think I did it correctly but I'm not willing to state that as a fact.

As another test I closed Outlook, deleted VbaProject.OTM, opened Outlook and recreated the code in ThisOutlookSession. Possibly when I do this I'm doing something wrong. I opened VBA, selected ThisOutlookSession, in the window on the right I pasted from the clipboard the code (I had saved the code in a txt file).

Thus I conclude that I'm still doing something wrong. The only good news at this point is that I believe I'm doing the same wrong thing on all three systems. :)

I've searched the web for postings for ThisOutlookSession as well as Application_Startup. I found postings that seemed to be similar to my issue but none of the suggestions resolved the issue. Anything I have found on the Microsoft site has totally confused me
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Now if reduce the size of the Outlook window, close/restart outlook the macro does NOT run, e.g. the window does not maximize, I don't see the pop-up message and when I click on the People icon the display defaults to Contacts.
I'm not so sure you are doing anything wrong - this behavior is not normal. It should run...
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
One posting I found said it worked when he switched it to
Public Sub Application_Startup()

When he switched back to private, it kept working. I'd try that...
 

JGT1942

New Member
Outlook version
Outlook 2013 32 bit
Email Account
POP3
One posting I found said it worked when he switched it to
Public Sub Application_Startup()

When he switched back to private, it kept working. I'd try that...
This one of the things I tried without success. I just gave it another try and no success.
I changed to Public, closed/reopened outlook, (the window was not resized as it should have been) clicked on People (Outlook 2013 x32), the wrong folder was selected. I changed it back to Private, retested, no change, e.g. not working as expected.
 
Status
Not open for further replies.
Top