 |
|
 |
Hi., Thanks for your add-in. But, may i know how to create a exe file for this. I need to work this in various machines.. Please help..
|
|
|
|
 |
|
 |
Hello:
Well, Thanks for visiting my article. However, I think build a package using .Net installer
could be a good idea.
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |
|
 |
Hi, thanks for this great article. When I am trying to open a new/existing message, inside AddToTask method it fails for me and shows the error message "Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook.TaskItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063035-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))." .
And it doesn't show the Toolbar due to the error. Could you think of any reason why this is happening? Ta.
|
|
|
|
 |
|
 |
can i use outlook 2010 addins in outlook 2007 using .net addin
|
|
|
|
 |
|
 |
Hi,
I'm not sure, I think you can't.
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |
|
 |
Perhaps you could add an example on how a right-click menu could be accessed and added a new menu item
|
|
|
|
 |
|
 |
Hi,
Thanks for sharing me, I hope i will add the popup menu / events etc... in my next entry.
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |
|
 |
Sounds great - looking forward to see the solution
|
|
|
|
 |
|
 |
Nice!
Thanks for sharing.
|
|
|
|
 |
|
 |
Thanks...........
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |
|
 |
------ Build started: Project: Outlook07AddIn, Configuration: Release Any CPU ------
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1970,9): error MSB3323: Unable to find manifest signing certificate in the certificate store.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Using the project provided in the .zip file for this article ...
|
|
|
|
 |
|
 |
Hi RedDK,
Could you please let me know the following:
(1) Do you try this for MS Office 2010.
(2) Do you compile it Framework4.0 / Using VS 2010 as an ID.
(3) Do you have Office 2007 installed.
Anyways, Although the list above are not pointing the error you facing, but this are important.
try the link below:
http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/f2b8771a-902c-4a9d-a2e1-cc8044e54421/[^]
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |
|
 |
Answers to questions:
1. no
2. doesn't "compile"
3. this article is about Outlook 2007
Thanks for that link but I at all cost avoid Microsoft forums.
|
|
|
|
 |
|
 |
I might have missed the point of this article but I've got nothing but a .zip file with stuff already applied to a wizard-created project named "OutlookAddIn1".
:|
|
|
|
|
 |
|
 |
Hi,
Thanks for the in-sight to office add-ins sections. Please provide the name of the book to get the more in-sight for office add-ins. I am specially looking for the information on office add-in for MS WORD.
Thanks and Regards,
Priyank Thakkar
|
|
|
|
 |
|
 |
This demo does great help to me,but I still don't know how to create my email toolbar button as figure-iv,could you add the code of creating my email toolbar button? Thanks.
I have another problem,when you create the second eamil,the toolbar button won't show.How to solve this problem?
modified on Sunday, October 17, 2010 5:24 AM
|
|
|
|
 |
|
 |
hanqi huang wrote: I still don't know how to create my email toolbar button as figure-iv
Hi,
I think you might skip the code snippets for creating toolbar button, anyways please download the source again & try one more, If you face any problem please let me know.
Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |
|
 |
hi,
could u plz tell me that how can i get mail details which were entered in composed mail... its urgent...
|
|
|
|
 |
|
|
 |
|
 |
salam Maruful.
I need to get all the email addresses listed in To recipient, cc recipient and bcc recipient when I click on New Email message. How do i do that.
Following would be the steps
1. Create new Email address
2. type email addresses in to, cc, bcc recipient
3. click on customised outlook tool bar button. It should give me all the addresses typed in.
Also if you can help me how to send email via other stmp server but smtp configured in outlook should remain unchanged
|
|
|
|
 |
|
 |
I'm working on Outlook addins, thanks for that.
here is the vb.net vers:
Imports Outlook = Microsoft.Office.Interop.Outlook
Imports Office = Microsoft.Office.Core
Imports System.Reflection
Public Class ThisAddIn
Private _objMenuBar As Office.CommandBar
Private _objNewMenuBar As Office.CommandBarPopup
Private _objToolBar As Office.CommandBar
Private _objNewToolBarButton As Office.CommandBarButton
Private Inspectors As Outlook.Inspectors
Private _objButton As Office.CommandBarButton
Private _objEmailToolBarButton As Office.CommandBarButton
Private _objTaskToolBarButton As Office.CommandBarButton
Private _objNoteToolBarButton As Office.CommandBarButton
Dim missing As Object = System.Reflection.Missing.Value
Private menuTag As String = "MyMenu"
Private menuToolBarTag As String = "MyToolBarButton"
Private toolBarTagEmail As String = "MyEmailToolBar"
Private toolBarTagTask As String = "MyTaskToolBar"
Private _id As String
Public Property Id() As String
Get
Return _id
End Get
Set(ByVal value As String)
_id = value
End Set
End Property
Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
'Add Toolbar
MyToolBar()
'Add Menubar
MyMenuBar()
'Add Items on mail and task
Inspectors = Me.Application.Inspectors
AddHandler Inspectors.NewInspector, AddressOf AddToEmail
AddHandler Inspectors.NewInspector, AddressOf AddToTask
End Sub
Private Sub ThisAddIn_Shutdown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shutdown
End Sub
#Region " Outlook2k7 Menu "
Private Sub MyMenuBar()
Me.ErsMyMenuBar()
Try
'Define the existent Menu Bar
_objMenuBar = Me.Application.ActiveExplorer().CommandBars.ActiveMenuBar
'Define the new Menu Bar into the old menu bar
_objNewMenuBar = DirectCast(_objMenuBar.Controls.Add(Office.MsoControlType.msoControlPopup, missing, missing, missing, False), Office.CommandBarPopup)
If _objNewMenuBar IsNot Nothing Then
_objNewMenuBar.Caption = "My Menu"
_objNewMenuBar.Tag = menuTag
_objButton = DirectCast(_objNewMenuBar.Controls.Add(Office.MsoControlType.msoControlButton, missing, missing, 1, True), Office.CommandBarButton)
_objButton.Style = Office.MsoButtonStyle.msoButtonIconAndCaption
_objButton.Caption = "My menu item."
'Icon
_objButton.FaceId = 500
_objButton.Tag = "ItemTag"
'EventHandler
AddHandler _objButton.Click, AddressOf _objButton_Click
_objNewMenuBar.Visible = True
End If
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error: " + ex.Message.ToString(), "Error Message")
End Try
End Sub
#End Region
#Region " Outlook2k7 ToolBar "
Private Sub MyToolBar()
ErsMyToolBar()
Try
' Add a new toolbar to the CommandBars collection
' of the Explorer window.
_objToolBar = Me.Application.ActiveExplorer().CommandBars.Add(menuToolBarTag, Office.MsoBarPosition.msoBarTop, False, True)
If _objToolBar IsNot Nothing Then
' Add a button to the new toolbar.
_objNewToolBarButton = DirectCast(_objToolBar.Controls.Add(Office.MsoControlType.msoControlButton, missing, missing, 1, True), Office.CommandBarButton)
_objNewToolBarButton.Style = Office.MsoButtonStyle.msoButtonIconAndCaption
_objNewToolBarButton.Caption = "My ToolBar Button"
_objNewToolBarButton.FaceId = 65
_objNewToolBarButton.Tag = menuToolBarTag
AddHandler _objNewToolBarButton.Click, AddressOf _objToolBarButton_Click
_objNewToolBarButton.Visible = True
_objToolBar.Visible = True
End If
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error: " + ex.Message.ToString(), "Error Message")
End Try
End Sub
#End Region
#Region " Outlook2k7 Active Object (Mail, Task, Notes) "
Private Sub AddToEmail(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector)
Dim _ObjMailItem As Outlook.MailItem = DirectCast(Inspector.CurrentItem, Outlook.MailItem)
If TypeOf Inspector.CurrentItem Is Outlook.MailItem Then
_ObjMailItem = DirectCast(Inspector.CurrentItem, Outlook.MailItem)
Dim IsExists As Boolean = False
For Each _ObjCmd As Office.CommandBar In Inspector.CommandBars
If _ObjCmd.Name = toolBarTagEmail Then
IsExists = True
_ObjCmd.Delete()
End If
Next
Dim _ObjCommandBar As Office.CommandBar = Inspector.CommandBars.Add(toolBarTagEmail, Office.MsoBarPosition.msoBarBottom, False, True)
_objEmailToolBarButton = DirectCast(_ObjCommandBar.Controls.Add(Office.MsoControlType.msoControlButton, 1, missing, missing, True), Office.CommandBarButton)
If Not IsExists Then
_objEmailToolBarButton.Caption = "My Email ToolBar Button"
_objEmailToolBarButton.Style = Office.MsoButtonStyle.msoButtonIconAndCaptionBelow
_objEmailToolBarButton.FaceId = 500
AddHandler _objEmailToolBarButton.Click, AddressOf _objEmailToolBarButton_Click
_ObjCommandBar.Visible = True
End If
End If
End Sub
Private Sub AddToTask(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector)
Dim _ObjTaskItem As Outlook.TaskItem = DirectCast(Inspector.CurrentItem, Outlook.TaskItem)
If TypeOf Inspector.CurrentItem Is Outlook.TaskItem Then
_ObjTaskItem = DirectCast(Inspector.CurrentItem, Outlook.TaskItem)
Dim IsExists As Boolean = False
For Each _ObjCmd As Office.CommandBar In Inspector.CommandBars
If _ObjCmd.Name = toolBarTagTask Then
IsExists = True
_ObjCmd.Delete()
End If
Next
Dim _ObjCommandBar As Office.CommandBar = Inspector.CommandBars.Add(toolBarTagTask, Office.MsoBarPosition.msoBarBottom, False, True)
_objTaskToolBarButton = DirectCast(_ObjCommandBar.Controls.Add(Office.MsoControlType.msoControlButton, 1, missing, missing, True), Office.CommandBarButton)
If Not IsExists Then
_objTaskToolBarButton.Caption = "My Task ToolBar Button"
_objTaskToolBarButton.Style = Office.MsoButtonStyle.msoButtonIconAndCaptionBelow
_objTaskToolBarButton.FaceId = 500
AddHandler _objTaskToolBarButton.Click, AddressOf _objTaskToolBarButton_Click
_ObjCommandBar.Visible = True
End If
End If
End Sub
Private Sub AddToNotes(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector)
Dim _ObjTaskItem As Outlook.NoteItem = DirectCast(Inspector.CurrentItem, Outlook.NoteItem)
If TypeOf Inspector.CurrentItem Is Outlook.NoteItem Then
_ObjTaskItem = DirectCast(Inspector.CurrentItem, Outlook.NoteItem)
Dim IsExists As Boolean = False
For Each _ObjCmd As Office.CommandBar In Inspector.CommandBars
If _ObjCmd.Name = toolBarTagTask Then
IsExists = True
_ObjCmd.Delete()
End If
Next
Dim _ObjCommandBar As Office.CommandBar = Inspector.CommandBars.Add(toolBarTagTask, Office.MsoBarPosition.msoBarBottom, False, True)
_objTaskToolBarButton = DirectCast(_ObjCommandBar.Controls.Add(Office.MsoControlType.msoControlButton, 1, missing, missing, True), Office.CommandBarButton)
If Not IsExists Then
_objTaskToolBarButton.Caption = "My Notes"
_objTaskToolBarButton.Style = Office.MsoButtonStyle.msoButtonIconAndCaptionBelow
_objTaskToolBarButton.FaceId = 500
AddHandler _objTaskToolBarButton.Click, AddressOf _objTaskToolBarButton_Click
_ObjCommandBar.Visible = True
End If
End If
End Sub
#End Region
#Region " Button Handlers "
Private Sub _objToolBarButton_Click(ByVal ctrl As Office.CommandBarButton, ByRef cancel As Boolean)
Try
System.Windows.Forms.MessageBox.Show("My ToolBar...")
'try getting ID
GetMessageID(Globals.ThisAddIn.Application.ActiveInspector)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error " + ex.Message.ToString())
End Try
End Sub
Private Sub _objButton_Click(ByVal ctrl As Office.CommandBarButton, ByRef cancel As Boolean)
Try
System.Windows.Forms.MessageBox.Show("My Menu...")
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error " + ex.Message.ToString())
End Try
End Sub
Private Sub _objEmailToolBarButton_Click(ByVal ctrl As Office.CommandBarButton, ByRef cancel As Boolean)
Try
System.Windows.Forms.MessageBox.Show("My Email ToolBar...")
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error " + ex.Message.ToString())
End Try
End Sub
Private Sub _objTaskToolBarButton_Click(ByVal ctrl As Office.CommandBarButton, ByRef cancel As Boolean)
Try
System.Windows.Forms.MessageBox.Show("My Task ToolBar...")
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error " + ex.Message.ToString())
End Try
End Sub
#End Region
#Region " Remove Existing Menu / Toolbar "
Private Sub ErsMyMenuBar()
'// If the menu already exists, remove it.
Try
Dim _objIsMenueExist As Office.CommandBarPopup = Me.Application.ActiveExplorer().CommandBars.ActiveMenuBar.FindControl(Office.MsoControlType.msoControlPopup, missing, menuTag, True, True)
If (_objIsMenueExist IsNot Nothing) Then
_objIsMenueExist.Delete(True)
End If
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error: " + ex.Message.ToString(), "Error Message")
End Try
End Sub
Private Sub ErsMyToolBar()
'// If the menu already exists, remove it.
Try
Dim _objTmpToolBar As Office.CommandBar = DirectCast(Me.Application.ActiveExplorer().CommandBars.FindControl(missing, missing, menuToolBarTag, True), Office.CommandBar)
If _objTmpToolBar IsNot Nothing Then
_objTmpToolBar.Delete()
End If
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show("Error: " + ex.Message.ToString(), "Error Message")
End Try
End Sub
#End Region
#Region " Get message id "
Private Sub GetMessageID(ByVal Insp As Microsoft.Office.Interop.Outlook.Inspector)
Dim strMsgID As String = String.Empty
Dim _ObjMailItem As Outlook.MailItem = Insp.CurrentItem
If Insp IsNot Nothing Then
If TypeOf Insp.CurrentItem Is Outlook.MailItem Then
_ObjMailItem = Insp.CurrentItem
strMsgID = _ObjMailItem.EntryID
For Each _attachment As Outlook.Attachment In _ObjMailItem.Attachments
'save it?
_attachment.SaveAsFile("c:/Temp/" + strMsgID + "-" + _attachment.FileName)
Next
End If
System.Windows.Forms.MessageBox.Show("ID: " + strMsgID, "Outlook Entry ID")
Id = strMsgID
End If
End Sub
#End Region
End Class
Regards /// Angel
|
|
|
|
 |
|
 |
Dear Angelo Cresta:
Thanks a lot for this support.............. Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |
|
 |
This is pretty standard demo stuff (infact I think I followed similar instructions last week when looking for how to do this), if you could expand it to maybe pull in data for an email, or some other utility, it would make it interesting. I would definitely review my vote if you could expand upon that.
|
|
|
|
 |
|
 |
Thanks a lot for read my article and some valuable comments on it...Actually I think it could be better for a beginner to start step by step.... Easy to complex. Definitely i try to figure out some more in my next part.
Thanks once again Thanks
Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
 |