mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-12 15:42:37 +01:00
Created Outlook integration (textile)
parent
6819c6ab3d
commit
1f1feb3379
1 changed files with 135 additions and 0 deletions
135
Outlook-integration.textile
Normal file
135
Outlook-integration.textile
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
h1. Microsoft Outlook/Tracks Integration
|
||||
|
||||
h2. Features
|
||||
|
||||
* Create a new Tracks todo directly from Microsoft Outlook.
|
||||
* Inserts an 'Add to Tracks' option in the right-click context menu for email items.
|
||||
* A popup dialog box allows the context and project of the item to be set.
|
||||
* Uses the RESTful API.
|
||||
|
||||
h2. Requirements:
|
||||
|
||||
Outlook 2003 (tested).
|
||||
Outlook 2007 (tested).
|
||||
|
||||
h2. Todo:
|
||||
|
||||
Due By/Show From
|
||||
|
||||
h2. Author
|
||||
|
||||
Greg Jarman.
|
||||
|
||||
I'm not a VBA coder - No guarantees on this software. I hope it works for you.
|
||||
|
||||
h2. Installation:
|
||||
|
||||
h3. Download Required Files
|
||||
|
||||
1. Download the file: [url=http://www.users.on.net/~greg_jarman/TodoForm10.zip]TodoForm10.zip[/url]. Unzip the contents to a temporary directory - which can be removed after the import in the next step.
|
||||
|
||||
h3. User Form Creation
|
||||
|
||||
2. Open Outlook. Go to the Tools menu, select Macro->Visual Basic Editor.
|
||||
3. The Virtual Basic Editor will open.
|
||||
4. Select File->Import...
|
||||
5. Import the TodoForm.frm file.
|
||||
6. Verify that you have a new item created under the Forms folder in your Project window.
|
||||
|
||||
h3. User Form Configuration
|
||||
|
||||
7. From the Project box, expand Forms.
|
||||
8. Right-click TodoForm and select View Code.
|
||||
9. Edit the file and set appropriate values for the following things:
|
||||
|
||||
* sURL: The address of your tracks installation.
|
||||
* sUsername: Your tracks username.
|
||||
* sPassword: Your tracks password.
|
||||
* sProxy: If required, configure the address and port of your proxy server. Otherwise, leave it blank.
|
||||
|
||||
h3. Outlook Integration
|
||||
|
||||
10. Still in Visual Basic: From the Project box, expand "Microsoft Office Outlook" to find "ThisOutlookSession".
|
||||
11. Right-click ThisOutlookSession and select "View Code".
|
||||
12. If you have anything existing in there called 'Private Sub Application_Startup()' STOP NOW and seek expert advice. Continuing may interrupt access to pre-existing customisations already present in your Oulook configuration.
|
||||
13. Otherwise, copy and paste the following into the Window:
|
||||
|
||||
[pre]
|
||||
|
||||
' greg jarman 20080821 v1.0 initial version
|
||||
'
|
||||
'
|
||||
|
||||
Option Explicit
|
||||
|
||||
Private WithEvents explorer As Outlook.explorer
|
||||
Private WithEvents mailItem As Outlook.mailItem
|
||||
|
||||
Const MENUITEM_TEXT = "Add To Tracks..."
|
||||
|
||||
Private Sub Application_Startup()
|
||||
' CheckLibrary
|
||||
|
||||
Set explorer = Application.ActiveExplorer
|
||||
Application.ActiveExplorer
|
||||
End Sub
|
||||
|
||||
Public Sub mailItem_CustomAction(ByVal Action As Object, _
|
||||
ByVal Response As Object, ByRef Cancel As Boolean)
|
||||
Select Case Action.Name
|
||||
Case MENUITEM_TEXT
|
||||
TodoForm.DescriptionTextBox.Text = mailItem.Subject
|
||||
TodoForm.NotesTextBox.Text = mailItem.Body
|
||||
TodoForm.Show
|
||||
Cancel = True
|
||||
Case Else
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub explorer_SelectionChange()
|
||||
Dim selectedItem As Object
|
||||
|
||||
For Each selectedItem In explorer.Selection
|
||||
If selectedItem.Class = olMail Then
|
||||
Dim newAction As Outlook.Action
|
||||
|
||||
Set mailItem = selectedItem
|
||||
Set newAction = mailItem.Actions.Item(MENUITEM_TEXT)
|
||||
If newAction Is Nothing Then
|
||||
Set newAction = mailItem.Actions.Add
|
||||
newAction.Name = MENUITEM_TEXT
|
||||
newAction.ShowOn = Outlook.OlActionShowOn.olMenu
|
||||
newAction.Enabled = True
|
||||
mailItem.Save
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
[/pre]
|
||||
|
||||
h3. Outlook Macro Security
|
||||
|
||||
14. Close the Visual Basic editor window.
|
||||
15. From the main Outlook menu, select Tools->Macro->Security. Ensure the Security Level setting is on Medium. You'll be prompted when a macro wishes to run, see below for an optional change to remove this warning.
|
||||
|
||||
h3. Testing Outlook Integration
|
||||
|
||||
16. Close Outlook and reopen it.
|
||||
17. Select Enable Macro to allow the Tracks macro to start up.
|
||||
18. Right click a mail message and select 'Add To Tracks...'
|
||||
19. Edit the fields, and hit 'Add Todo'
|
||||
20. Verify the new item is visible in your Tracks browser interface.
|
||||
|
||||
h3. Self-signing the Macro
|
||||
|
||||
It is possible to sign the VBA code in order to prevent the Macro Security warning popups whenever you start Outlook. This section is optional - the functionality of the addon is not otherwise enhanced by this change.
|
||||
|
||||
# Browse to Program Files\Microsoft Office\Office folder (Office12 for a 2007 installation).
|
||||
# Locate a program called 'selfcert.exe'. If it is not present you'll need to rerun office setup and add [b]Digital Signature for VBA Projects[/b] from the [b]Office Tools[/b] section.
|
||||
# Execute selfcert.exe.
|
||||
# Type your name into the field provided. This will generate a self-signed certificate for you, you can look it up in Control Panel->Internet->Content->Certificates.
|
||||
# Next, open Outlook and go to Tools->Macro->Visual Basic Editor.
|
||||
# Go to the Tools menu, and select Digital Signature.
|
||||
# Press the Choose button, select your new certificate from the list and hit okay.
|
||||
# Close Outlook and re-open it. You may be prompted to trust the certificate the first time you use it, but after that you should not see any further security warnings on startup.
|
||||
Loading…
Add table
Add a link
Reference in a new issue