how can Apply User-defined Field to all Sub Folder and Other

Status
Not open for further replies.

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Hi

I have contact folder above 15 so. we create any field one folder how can apply same field my other all folder use micro and 1 click
 

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Hi
Thanks for Reply
we already use " AssignViewtoFolder " your Micro Code
this tool Perfect same type Code Possible for User Field New " Assign User Field to All Folder"
please Guide me..

we have new User Field above 20 to 22 Field
we have Contact folder Above 50 to 60 Separate Name
every field Create all Folder one by one add work more time
so any Code Assign Apply Created New User Field Apply to all folder

[Did you try creating a view containing the field and applying it to the folder? ]

View and Apply All folder... But..
Display User Filed all folder but ' Field Chooser > User Filed > Not Display our NEW CREATED FIELD
How can Possible Display all Field ?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
View and Apply All folder... But..
Display User Filed all folder but ' Field Chooser > User Filed > Not Display our NEW CREATED FIELD
How can Possible Display all Field ?
It sounds like the field is not a field in the folder, but in an item, so it's not seen by the view. I'll have to think on what might be the best way to handle this.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
After the For line that sets the folder, try creating the custom field if it doesn't exist - this example adds it to the subfolders - the field needs to already exist in the parent folder.

For i = CurrentFolder.Folders.Count To 1 Step -1
Set olNewFolder = CurrentFolder.Folders(i)
For Each olNewFolder In CurrentFolder.Folders

' replace olNewFolder with the object name you are using for folders.
With olNewFolder.UserDefinedProperties
'On Error Resume Next
Set objProperty = .Add("fieldname1", type, optional format)
Set objProperty = .Add("fieldname2", olDuration)
Set objProperty = .Add("fieldname3", olYesNo, olFormatYesNoYesNo)
End With


Types & formats: UserDefinedProperty.DisplayFormat Property (Outlook) - if a format is not specified, the default format is used.
 

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Specially Thank ...
how can do it ..
this is a MICRO ?
how can use this please explain detail
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
look in the macro code you are using now. The AssignViewtoFolder macro at Apply a View to a Folder using a Macro has this line -

For Each F In Folders
Set Application.ActiveExplorer.CurrentFolder = F

After setting the folder to the F object, add this, using the field names and field types used by your fields. (Text fields are olText)

With F.UserDefinedProperties
'On Error Resume Next
Set objProperty = .Add("myfield", olText)
End With
 

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Public Sub AssignViewtoFolders()
On Error Resume Next
Dim Ns As Outlook.NameSpace
Dim Folders As Outlook.Folders
Dim CurrF As Outlook.MAPIFolder
Dim F As Outlook.MAPIFolder
Dim ExpandDefaultStoreOnly As Boolean
Set Ns = Application.GetNamespace("Mapi")
Set CurrF = Application.ActiveExplorer.CurrentFolder
Set F = Ns.GetDefaultFolder(olFolderInbox)
Set F = F.Parent
Set Folders = F.Folders
LoopFolders Folders, True

'DoEvents
Set Application.ActiveExplorer.CurrentFolder = CurrF
End Sub
Private Sub LoopFolders(Folders As Outlook.Folders, _
ByVal bRecursive As Boolean _
)
Dim F As Outlook.MAPIFolder
For Each F In Folders
Set Application.ActiveExplorer.CurrentFolder = F

If F.DefaultItemType = olContactItem Then
Debug.Print F.Name
Set objViews = F.Views
Set objView = objViews.Item("Assigned")
objView.Apply
End If
If bRecursive Then
If F.Folders.Count Then
LoopFolders F.Folders, bRecursive
End If
End If
Next
End Sub
 

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Hello
we use Above Type of Code
My new field Native State Text /Text

please save 1 user field Set after we add line my other user field

Native State - Text -Text
Native District
Native Taluka
Native Gaon
our user field name




we have not more technical knowledge please set all micro code
 

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Hello Please send me ready to micro use for use
we can field name add ' filed Name'
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
That macro just applies the view to all folders - if the field does not exist, the view won't add it to the view. I don't know if i have any code samples that copy the folder - will check.
 

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
THIS MICRO HOW CAN RUN AND WORK

After the For line that sets the folder, try creating the custom field if it doesn't exist - this example adds it to the subfolders - the field needs to already exist in the parent folder.

For i = CurrentFolder.Folders.Count To 1 Step -1
Set olNewFolder = CurrentFolder.Folders(i)
For Each olNewFolder In CurrentFolder.Folders

' replace olNewFolder with the object name you are using for folders.
With olNewFolder.UserDefinedProperties
'On Error Resume Next
Set objProperty = .Add("fieldname1", type, optional format)
Set objProperty = .Add("fieldname2", olDuration)
Set objProperty = .Add("fieldname3", olYesNo, olFormatYesNoYesNo)
End With


Types & formats: UserDefinedProperty.DisplayFormat Property (Outlook) - if a format is not specified, the default format is used.
 

GIRISH

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Hello
we use Above Type of Code
My new field Native State Text /Text

please save 1 user field Set after we add line my other user field

Native State - Text -Text
Native District- Text -Text
Native Taluka- Text -Text
Native Gaon- Text -Text
our user New Create field name

please any micro solution Contact folder and other folder or sub folder apply User field to all folder
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A Apply Selected Emails to outlook rules and Run Rules Using Outlook 5
J Automatically forward email and apply template Outlook VBA and Custom Forms 0
O How to apply view settings on all accounts and folders Using Outlook 7
E Apply customized Business Card for all users Outlook VBA and Custom Forms 0
Diane Poremsky Use Word Macro to Apply Formatting to Email New Slipstick.com Articles 0
Diane Poremsky Apply Outlook Stationery to Replies and Forwards New Slipstick.com Articles 0
A Can i apply mail rules to inbox sub folders using VBA Outlook VBA and Custom Forms 2
B Apply two rules on one email Using Outlook 2
R Rules - apply to messages > n days old Using Outlook 2
B Unable to apply rule on Exchange server functional account Exchange Server Administration 1
M Apply different views to calendars Using Outlook 0
C Apply Category Color for Appointment Background Color Calendar Printing Assistant 2
F Apply Follow up flag ONLY to the people cc'd. Using Outlook 1
T Is there a way to apply a macro before a signature is applied in email? Using Outlook 1
K Why doesn't a rule apply to a friendly name? Using Outlook 2
L Unable to apply SP1 to Exchange 2010 Exchange Server Administration 5
T -basefolderonly still apply when creating a new retention policy in Exchange 2010/sp1? Exchange Server Administration 6
H Create/Apply auto formatting rules by VB? Outlook VBA and Custom Forms 2
R Apply a category to item in inbox view Outlook VBA and Custom Forms 1
D Outlook 2010 Outlook in Windows 10 keeps asking for user name and password repeatedly Using Outlook 14
E Asking user to select multiple options in a list in an email Outlook VBA and Custom Forms 0
icacream Enter your user name and password for the following server. Using Outlook 5
B User defined field for messages with 'me' in the [To], [Cc] line Using Outlook 0
S User Defined Fields adding new value (2) Using Outlook 0
R Creating a user defined function Outlook VBA and Custom Forms 3
M Compile error: User-defined type not defined Outlook VBA and Custom Forms 0
M How to export Voting Results with user names and their responses Outlook VBA and Custom Forms 13
M vCard does not have user-defined fields from my custom contact form (365) Using Outlook 1
C Outlook 2016 Conditional Format for User Defined Field Using Outlook 1
G <mailto:user@domain.com<mailto:user@domain.com<mailto:user@domain.com>>> Using Outlook 5
F MAPI, User Defined Fields and perspective after 20 years Outlook VBA and Custom Forms 0
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
A Created a new user account and the local account cannot see email Using Outlook 3
N How to set automatically the default or user defined Quickstyle Templates by Answer in Outlook Using Outlook 1
S Custom Form, copy user field data to message body Outlook VBA and Custom Forms 12
Daniel Schunk User-defined form arrives empty at the recipient Using Outlook 3
C Changed By field not displaying individual user's name in O365 Shared Mailbox Using Outlook 9
M other user's mailbox won't open, forms disappeared Using Outlook 42
S Custom user fields in received messages Outlook VBA and Custom Forms 1
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 10
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 0
Potty Ash MS Outlook 2010 custom form - validation or formula to request user to check a checkbox Outlook VBA and Custom Forms 16
P Change PC User Directory & iPhone Sync Using Outlook 2
J Assess content of User Defined Field in Rule Using Outlook 3
M How can I determine which user read an email Exchange Server Administration 4
J reinstalling Outlook 2007 asking for user name & password Using Outlook 14
R Prompt asking the user to send email to folder as *.msg file Outlook VBA and Custom Forms 1
J Outlook - 2013 - Error msg when copying folders from Online Archives to another user's mailbox Using Outlook 0
N Select a folder in a user account Outlook VBA and Custom Forms 2
S Outlook User defined date field (UDF) not syncing Using Outlook 2

Similar threads

Top