![]() |
| 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. |
|
|||||||
| Tags: automated, email, layouts, setting, viewing |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'd like to set up a VBA macro that when run will check and reset all mail
viewing layouts for all my .pst files, both Personal Folders and Archives. I find that when I manually add a new folder, for example, it defaults back to what seems to be an Outlook Standard layout for viewing email. I then have to go in and reset it by hand. This also happens during archiving -- if the archive program sets up and copies archived messages to a folder it creates, the viewing options are now back to this aforementioned seeming standard. I deal with thousands of stock market tickers I track, so the manual reset seems to take all my time. For example, I first right-click in a new folder I've just created and go to "Customize Current View". Then I select "Other Settings" and then click "Reading Pane OFF", ok, ok. Then I move and adjust the columns the way I want them. Then I right-click on the date (Received, Send, etc.) and go to "Arrange BY" and click "Date" and then click to turn off "Show in Groups". I'd like to be able to invoke a macro that would ask me the .pst filename, then would chase all the folders in the file to ensure that the mail folders are formatted as I've discussed, hopefully in the background so I can continue to work. |
| Ads |
|
#2
|
|||
|
|||
|
What your code would need to do is to capture the existing custom view you
want and apply the view XML to all the other folders. Take a look here for an example of creating and applying a custom view: http://www.outlookcode.com/threads.a...4&messageid=19 Your code will run in the foreground, so be prepared to wait while it runs. Why not just create the custom view you want and set the setting for having it available for all folders of that type? Then you just have to select that view in the views dropdown. You'd just have to capture it once for each PST file and apply it, then it would be available for all folders in that PST file. -- 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 "BigDocD" wrote in message ... I'd like to set up a VBA macro that when run will check and reset all mail viewing layouts for all my .pst files, both Personal Folders and Archives. I find that when I manually add a new folder, for example, it defaults back to what seems to be an Outlook Standard layout for viewing email. I then have to go in and reset it by hand. This also happens during archiving -- if the archive program sets up and copies archived messages to a folder it creates, the viewing options are now back to this aforementioned seeming standard. I deal with thousands of stock market tickers I track, so the manual reset seems to take all my time. For example, I first right-click in a new folder I've just created and go to "Customize Current View". Then I select "Other Settings" and then click "Reading Pane OFF", ok, ok. Then I move and adjust the columns the way I want them. Then I right-click on the date (Received, Send, etc.) and go to "Arrange BY" and click "Date" and then click to turn off "Show in Groups". I'd like to be able to invoke a macro that would ask me the .pst filename, then would chase all the folders in the file to ensure that the mail folders are formatted as I've discussed, hopefully in the background so I can continue to work. |
|
#3
|
|||
|
|||
|
Thanks for responding so fast, Ken. I see your example address came up to
Sue Mosher's reference site. I have her latest book in my "To Read" file. Maybe I'll understand the example after I do that. Your suggestion about creating a custom view would be fine except that I can't find any reference as to how to apply it to a whole .pst file. I've tried doing that a couple of ways and it turns out fine for the root folder, but not the subfolders. Perhaps you could explain specifically how I do that application of the custom view. Al "Ken Slovak - [MVP - Outlook]" wrote: What your code would need to do is to capture the existing custom view you want and apply the view XML to all the other folders. Take a look here for an example of creating and applying a custom view: http://www.outlookcode.com/threads.a...4&messageid=19 Your code will run in the foreground, so be prepared to wait while it runs. Why not just create the custom view you want and set the setting for having it available for all folders of that type? Then you just have to select that view in the views dropdown. You'd just have to capture it once for each PST file and apply it, then it would be available for all folders in that PST file. -- 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 "BigDocD" wrote in message ... I'd like to set up a VBA macro that when run will check and reset all mail viewing layouts for all my .pst files, both Personal Folders and Archives. I find that when I manually add a new folder, for example, it defaults back to what seems to be an Outlook Standard layout for viewing email. I then have to go in and reset it by hand. This also happens during archiving -- if the archive program sets up and copies archived messages to a folder it creates, the viewing options are now back to this aforementioned seeming standard. I deal with thousands of stock market tickers I track, so the manual reset seems to take all my time. For example, I first right-click in a new folder I've just created and go to "Customize Current View". Then I select "Other Settings" and then click "Reading Pane OFF", ok, ok. Then I move and adjust the columns the way I want them. Then I right-click on the date (Received, Send, etc.) and go to "Arrange BY" and click "Date" and then click to turn off "Show in Groups". I'd like to be able to invoke a macro that would ask me the .pst filename, then would chase all the folders in the file to ensure that the mail folders are formatted as I've discussed, hopefully in the background so I can continue to work. |
|
#4
|
|||
|
|||
|
Every folder has a Views collection. Once you have the view XML as a string
you can add the view to the Views collection of every folder and then Apply() that view as the current folder view. Of course you have to Save() the view after you add it to the Views collection. You'd have to traverse the folder hierarchy to do that for every folder in a PST file. Sue's book and Web site have examples of traversing a folder hierarchy. I find it easiest to create my views in the UI and then extract the view XML for re-use in the code. Then I tweak the view XML. Some things like autoformatting can't be applied using view XML. -- 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 "BigDocD" wrote in message ... Thanks for responding so fast, Ken. I see your example address came up to Sue Mosher's reference site. I have her latest book in my "To Read" file. Maybe I'll understand the example after I do that. Your suggestion about creating a custom view would be fine except that I can't find any reference as to how to apply it to a whole .pst file. I've tried doing that a couple of ways and it turns out fine for the root folder, but not the subfolders. Perhaps you could explain specifically how I do that application of the custom view. Al |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outlook Print Layouts | KB | Outlook - Calandaring | 1 | September 5th 07 04:29 AM |
| How do you Disable Outlook Warning in Automated Email? | Need lots of help! | Outlook and VBA | 1 | January 13th 07 08:36 AM |
| Automated Email in a Custom Contact Form | Michelle W@ | Outlook - Using Forms | 0 | October 11th 06 05:56 PM |
| I need the file layouts for calendar to assist in importing from e | JC | Outlook - Calandaring | 1 | April 7th 06 08:41 PM |
| using mapisend for an automated email, want to diasable popup | Raj | Outlook - Installation | 1 | March 3rd 06 07:23 PM |