PDA

View Full Version : Outlook Defined Views



lms
10-02-2013, 03:38 PM
I created a list of Defined Views that each one shows different fields in the columns of the contact folder. I then found this macro that is perfect that I can use to adjust the view of the contacts and decide which Defined View to show...but the Defined View field areas are not saving the "Best Fit" area for each field.....Is there something to add to the macro or another macro to automatically best fit all columns automatically using the macro?

Sub GetAssignedView_Name_of__Fields()
Dim objViews As Views
Dim objView As View
' Applies view to select folder
Set objViews = Application.ActiveExplorer.CurrentFolder.Views
'Get the view
Set objView = objViews.item("View Defined View Name")
'apply the view
objView.Apply
End Sub

lms
10-08-2013, 05:01 PM
One more thought just in case you have an idea.

Here is the macro code from Excel where it identifies all columns and then automatically fits them based on the words in the columns to best fit. So any thoughts to turn this into a Outlook Code for the list of columns when I am viewing the contacts from the Contact folder or any subfolders etc.

Sub Bet_Fit_All_Columns()
'
' Bet_Fit_All_Columns Macro
'
'
Cells.Select
Range("J11").Activate
Selection.Columns.AutoFit
End Sub