Outlook 2007 Macro to Add Text to a Contact Field

Status
Not open for further replies.

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
The form of my contact has a number of extra fields that I use for insert information regarding the contacts.

I have Yes/No fields, Date/Time fields, and Combobox fields.

In the past, I have the macro codes that if I identify a contact in a contact folder or subfolders, or open a contact, I create a email to that contact.

Is there there a macro form that identifies the name of the field in the form of the contacts, and when I identify or open a contact, I run the macro and it adds to the field the words I want to use? This way if I am going thru 500 contacts and each one needs the same words or date in a field, I can add to them much much faster.

This would be another upgrade that would be helpful!! Thanks so much!!!
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Thanks so fast.....I don't know what you mean by merge..it's just adde the words or dates I want to use to the a contact and the specific contact field that itshould go into...

So here is the code you gave me in the past that creates the email to the contact...so it identifies the contact and it email address....so is possible for you to copy this and change it and just paste it back to me....and then I can use it as form where I decide the field I want to add to and what to put in it:

Set oContact = GetCurrentItem()

Dim objMsg As MailItem

' Blank message

' Set objMsg = Application.CreateItem(olMailItem)

' Use a template

Set objMsg = Application.CreateItemFromTemplate("C:\Users\Stoler Law\AppData\Roaming\Microsoft\Templates\TemplateName.oft")
objMsg.To = oContact.Email1Address
'displays the message form so you can enter more text
objMsg.Display
'use this to send to outbox
'objMsg.Send
Set objMsg = Nothing

End Sub

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application

Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.currentItem
End Select

Set objApp = Nothing

End Function
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
The code i need is not an email. Just showing how you referred to a contact. Just need to add the words i want to the fields in the contact. And also, you gave me in the past a macro to put words in the note field
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Sent a longer email to you to read please
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
It'll be tomorrow at the earliest- today is deadline day, i only answer quick and easy questions so things don't get out of control on deadline day. :)
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Thank you. I so appreciate you doing it as soon as possible, as this will be a major upgrade to what I have to do.;)
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
In the following code where it identifies the fields of the contact andhow I put in the contact field, the words or dates I want…….here is the basiccode and I was wondering can we add to it so that it identifies a commandbottonin the contact that when I click on it, it runs the macro from the script inthe contact form…..



So for example, I can add the field re the Task date but I wouldlike to be able to just click on one thing clicks thecommandbutton in the contact that then creates a task for the contact or asmany contacts I identify….as that is much faster to do it…..and this code adds to the comboboxes of the contacts that I identify, the words I put in......and the commandbutton that creates that task of that contact is based on a script in the contact form that the commandbutton runs.....

And also, I created in the Outlook Session area the "runthis" concept and as a macro, I then put it on the toolbar and I run it....see the fields in one combobox, and then the next combobox is where I have the words to add to specific fields....and in the Userform of the comboboxes there is the commandbutton that you click and it runs the words to fields of the contacts




So next post Is the basic code …and would love to hearback



- - - Updated - - -

Private Sub btnRun_Click()

Dim Field As String

Dim value As String

Field = Me.ddlFields.Text

value = Me.ddlValues.Text

UpdateContactField Field, value

Me.Hide

End Sub

Private Sub ddlFields_Change()

Dim fld As String

fld = Me.ddlFields.Text

'Add your field related values here.

Select Case fld

Case "FieldName"

Me.ddlValues.addItem "Words to the Field"

Private Sub UserForm_Initialize()

'Add your field names here.

Me.ddlFields.addItem "FieldName

End Sub
 

LMS

Senior Member
Outlook version
Outlook 2007
Email Account
Exchange Server
Any help from the Smart Woman??:confused:
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
So you want to select a bunch of contacts, click a command button to bring up the form to enter some words, which are them used to create the tasks for the contacts? That is doable. :)
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
L Outlook 2007 - Macro Re Search Using Outlook 16
L Outlook 2007 Macro to Contact From a Field Using Outlook 3
L Outlook 2007 Macro Save Contact Using Outlook 10
L Outlook 2007 Macro Reply to E-mail Using Outlook 16
L Outlook 2007 Macro Search Contacts Using Outlook 9
L Outlook 2007 Macro to LinkedIn Using Outlook 3
L Outlook 2007 Macro Open Contact Folder Using Outlook 7
L Macro to Open a Specific Word Document - Outlook 2007 Using Outlook 17
L Outlook 2007 Macro For Views Using Outlook 10
L Outlook 2007 Macro to Run a Script From a Contact Form Using Outlook 41
F Help with Outlook 2007 Macro Please! Using Outlook 4
D outlook 2003/2007 macro query Using Outlook 2
L Outlook 2007 Macro to Email Field Using Outlook 31
O Macro for creating hyperlinks in Outlook 2007 Using Outlook 3
I Outlook 2007 Macro/VBE disables How to enable Using Outlook 5
T Converting Word 2007 macro to Outlook 2007 macro Using Outlook 3
S Outlook 2007 Macro for replying to an e-mail. Outlook VBA and Custom Forms 1
J Can't run macro Outlook 2007 that was created in Word 2007 Outlook VBA and Custom Forms 1
I Creating an Outlook 2007 macro that attaches a signature to new me Outlook VBA and Custom Forms 1
L Help for writing an Outlook 2007 macro Outlook VBA and Custom Forms 7
D Insert Text via Macro in Outlook 2007 Outlook VBA and Custom Forms 2
G Outlook 2007 Macro: Paste - Paste Special - Unformatted Text Outlook VBA and Custom Forms 9
C After Office 2007 SP2 install - Outlook 2007 macro no longer worki Outlook VBA and Custom Forms 11
R Anyone have a sample macro for Outlook 2007 (setting the zoom)? Outlook VBA and Custom Forms 1
S Outlook 2007: automating form with macro Outlook VBA and Custom Forms 2
S How to create a macro to insert a signature in Outlook 2007 Outlook VBA and Custom Forms 1
S Verwendung von Outlook 2007 Using Outlook 0
A Arthur needs help with 2007 Outlook e-mail Using Outlook.com accounts in Outlook 3
M PST import from Outlook 2007 to 2010 - Address Book contacts all in 1 group Using Outlook 4
S outlook 2007 calendar search Using Outlook 6
B Migrate Outlook 2007 to Office 365 Using Outlook 3
X I have met my waterloo trying to resolve embedded graphics problem with outlook 2007 and now 2016 Using Outlook 1
R Outlook 2007 only loads some appointments Using Outlook 0
C Move Outlook 2007 to new PC with Outlook 365 Using Outlook 3
J Outlook 2007 Hide Messages Option not Available Using Outlook 2
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 4
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 0
B Server errors Outlook 2007 Using Outlook 1
S Reboot of frozen windows7 results in changed outlook 2007 settings Using Outlook 1
S Outlook 2007 printing wrong email address at top of page Using Outlook 8
M Configure outlook 2007 to accept digital signatures Using Outlook 2
D Outlook 2007 crashes when opening an email Using Outlook 2
R New chap saying hello and needing advice on Outlook 2007 thumbnails Using Outlook 3
icacream From Outlook 2007 to 2016 ! Using Outlook 9
vodkasoda Object could not be found Error in Outlook 2007 Outlook VBA and Custom Forms 5
S Outlook 2007: Address Cards allow entering text! Why? Using Outlook 3
S View Appointment in Text Wrap in Outlook 2007 Month Calendar View Using Outlook 0
L Outlook 2007 Separate the Send/Receive functions Using Outlook 2
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
C Move from Outlook 2007 Enterprise (MOE) to Outlook Pro plus 2007 Using Outlook 1
Similar threads


















































Top