PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Creating a simple add-in.
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Creating a simple add-in.
![]() |
Creating a simple add-in. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi
I would like to build an add-in that will create a textbox and a button in the outlook toolbar , and when I press on the button, it will add a new contact with my details. How do I do that? it supposed to be very easy.. Thanks!! Dan -- Message posted via http://www.officekb.com |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Go to http://www.microeye.com and get the Items Command Bar sample add-in.
It will show you everything you need to know. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Dan Berachowitz via OfficeKB.com" <forum@OfficeKB.com> wrote in message news:d29280943cc9418f8c44a5116fb8904f@OfficeKB.com... > Hi > > I would like to build an add-in that will create a textbox and a button in > the outlook toolbar , and when I press on the button, it will add a new > contact with my details. > How do I do that? it supposed to be very easy.. > > Thanks!! > Dan > > -- > Message posted via http://www.officekb.com |
|
|
|
#3 |
|
Guest
Posts: n/a
|
I downloaded all the files but I dont know what to do with it...
-- Message posted via http://www.officekb.com |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Hello Dan,
maybe this is a simple solution for you, it's not an AddIn, it's just macros. Installation: Start Outlook Press Alt + F11 DoubleClick on Project | Microsoft Outlook | ThisOutlookSession Paste in this code: '-------------------------------------------------- Private Sub Application_Startup() CreateCommandBar End Sub '---------------------------------------------------- then Click on Module and if there is a Module1 DoubleClick, if not Create a new one paste in this code: '---------------------------------------------------- 'This function creates our CommandBar 'It's called from Application.StartUp event in 'ThisOutlookSession' Public Sub CreateCommandBar() On Error Resume Next Dim objCommandBar As CommandBar Dim objButton As CommandBarButton Dim objTextBox As CommandBarControl 'Create a new CommandBar Set objCommandBar = ActiveExplorer.CommandBars.Add("Contacter", , , True) objCommandBar.Visible = True objCommandBar.Position = msoBarTop 'Create a simple Textbox Set objTextBox = objCommandBar.Controls.Add(Office.msoControlEdit, , , , True) objTextBox.Caption = "ClickBox" objTextBox.Tag = "ClickBox" objTextBox.Width = 200 objTextBox.OnAction = "NewContact" 'Create a nice Button Set objButton = objCommandBar.Controls.Add(msoControlButton, , , , True) objButton.Caption = "New Contact" objButton.Style = msoButtonIconAndCaption objButton.FaceId = 607 'Tell the Button which Macro has to be called on click... objButton.OnAction = "NewContact" ' Forget the Objects Set objButton = Nothing Set objTextBox = Nothing Set objCommandBar = Nothing End Sub 'Here we create our new Contact with Information from Textbox.... Public Sub NewContact() On Error Resume Next Dim objTextBox As CommandBarControl Dim objContact As ContactItem Application.CreateItem olContactItem 'Get the Textbox Set objTextBox = ActiveExplorer.CommandBars("Contacter").FindControl(Tag:="ClickBox") Set objContact = Application.CreateItem(olContactItem) objContact.FullName = objTextBox.Text objContact.Display Set objContact = Nothing Set objTextBox = Nothing End Sub '---------------------------------------------------- The Textbox however needs to press enter to get the text. I Programmed so that if you press enter the contact is created. P.S. learned from Sue ;-) -- regards Helmut Obertanner Technical Consultant Softwaredevelopment DATALOG Software AG | Zschokkestr. 36 | D-80687 Munich web: www.datalog.de .... and IT works! "Dan Berachowitz via OfficeKB.com" <forum@OfficeKB.com> schrieb im Newsbeitrag news:843839c2f33a41388f21b64391c6ea03@OfficeKB.com... >I downloaded all the files but I dont know what to do with it... > > -- > Message posted via http://www.officekb.com |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Load the project file into VB and study it and its components.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Dan Berachowitz via OfficeKB.com" <forum@OfficeKB.com> wrote in message news:843839c2f33a41388f21b64391c6ea03@OfficeKB.com... >I downloaded all the files but I dont know what to do with it... > > -- > Message posted via http://www.officekb.com |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

