Solved

Ad translate button in Outlook 2007 Menu / Add Google Translate API in Outlook

Posted on 2009-05-18
5
956 Views
Last Modified: 2012-05-07
Hi Guys

I have 2 questions
1.- How can i add the translation button in Outlook 2007
2.- How can i integrate the Google Translation API in Outlook 2007

Please comment
0
Comment
Question by:titorober23
  • 3
  • 2
5 Comments
 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 300 total points
ID: 24424068
Hi, titorober23.

1.  I can show how to add a toolbar button or, perhaps better, right-click context menu.  Which do you prefer?

2.  I thought I answered this in your previous question.  The code in that question integrates the Translation API using a rule.  What other form of integration did you have in mind?
0
 

Author Comment

by:titorober23
ID: 24432761
Yes, please show me how
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24433875
Show you how to what, add a button or a right-click context menu?
0
 

Author Comment

by:titorober23
ID: 24447583
both, please
0
 
LVL 76

Accepted Solution

by:
David Lee earned 300 total points
ID: 24456068
Here's how to add a toolbar button.

1.  Click View->Toolbars->Customize
2.  Click the Toolbars tab
3.  Click New
4.  Name the toolbar
5.  Click the Commands tab
6.  Under Categories click Macros
7.  Under Commands click and hold on the macro, then drag it out and drop it on the new toolbar
8.  Dock the toolbar somewhere onscreen

The code below adds a right-click context meu.
Private Sub Application_ItemContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Selection As Selection)

    Const msoControlButton = 1

    Const msoButtonIconAndCaption = 3

    Dim objButton As CommandBarButton

    Set objButton1 = CommandBar.Controls.Add(msoControlButton)

    With objButton

       .Style = msoButtonIconAndCaption

       'Enter your caption text'

       .Caption = "Hello World"

       .Parameter = Selection.Item(1).EntryID

       'List of face IDs here: http://www.kebabshopblues.co.uk/2007/01/04/visual-studio-2005-tools-for-office-commandbarbutton-faceid-property/'

       .FaceId = 355

       'Enter the macro you want to run.  Be sure to include the Project and module names.'

       .OnAction = "Project1.Module1.HelloWorld"

   End With

End Sub

Open in new window

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Outlook Free & Paid Tools
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now