Hi Brian
On Friday, January 15, 2016 at 12:20:55 AM UTC, btheado wrote:
>
> I made use of these outlook urls with leo a long time ago. I didn't
> integrate it into leo urls. Instead I just setup a few keyboard shortcuts.
>
> # This command copies outlook link of current selected email into the body
> at the current insertion point
> import win32com.client
> @g.command("insert-outlook-email-link")
> def insertOutlookEmailLink(event):
> c=event['c']
> ol = win32com.client.Dispatch("Outlook.Application")
> m = ol.ActiveExplorer().Selection.Item(1)
> u = "outlook:%s <MESSAGE: %s>" % (m.EntryID, m.Subject)
> w = c.frame.body.bodyCtrl
> i = w.getInsertPoint()
> w.insert(i,u)
>
>
> # This command will launch the outlook url (the url text must be selected):
> import subprocess
> @g.command("open-selected-outlook-link")
> def openSelectedOutlookLink (event):
> c = event['c']
> r = c.frame.body.getSelectionRange()
> url = c.frame.body.get(r[0], r[1])
>
> # The dos 'start' command understands outlook urls
> subprocess.Popen("cmd /k start " + url)
>
>
>
> These were my shortcuts:
>
> insert-outlook-email-link = Ctrl-Shift-O
> open-selected-outlook-link = Ctrl-Shift-J
>
>
> Not what you were after as it looks like you already figured out most of
> the above, but I thought I'd share in case it helps.
>
> Brian
>
That's *really* helpful, thanks. alling me to select and use via keyboard
shortcuts was going to be my next step, as a learning exercise if nothing
else, on the road to the ctrl-click action I suggested.
I'll definitely be able to use this, many thanks.
Jon N
>
>
> On Thu, Jan 14, 2016 at 11:22 AM, jkn <[email protected]
> <javascript:>> wrote:
>
>> Hi Largo84
>>
>>
>> On Thursday, January 14, 2016 at 3:53:10 PM UTC, Largo84 wrote:
>>>
>>> Based on my reading of this Microsoft update
>>> <https://support.microsoft.com/en-us/kb/929590>, that may no longer be
>>> possible for Outlook 2007 and above.
>>>
>>> Rob............
>>>
>>> On Tuesday, January 12, 2016 at 4:04:40 PM UTC-5, jkn wrote:
>>>>
>>>> Hi Edward (mainly)
>>>>
>>>> Windows has a somewhat-supported and poorly documented 'outlook:'
>>>> protocol, which can be used with appropriate 'path' entries to do useful
>>>> things with Outlook-based email elements. For instance, the URL
>>>>
>>>> "outlook:00000000BB1BBDFACA3A... 84000026F87CCA0000" # elided for
>>>> example purposes
>>>>
>>>> on my system refers to a particular email. It takes a bit of setting up
>>>> to use this (see some references below), but once I have such a URL I can
>>>> for instance put it into the address bar in (File) Explorer and Outlook
>>>> will bring up the email.
>>>>
>>>> I can also do something similar with Python; both the following
>>>> fragments do something similar:
>>>>
>>>> PROTOCOL = "outlook:"
>>>> TEST_URL = "00000000BB1BBDFACA3A... 84000026F87CCA0000"
>>>>
>>>> import os
>>>> os.startfile(PROTOCOL + TEST_URL, 'open') # second parameter not
>>>> needed ?
>>>>
>>>> # and
>>>> import win32api
>>>> win32api.ShellExecute(0, 'open', PROTOCOL + TEST_URL, "", "", 0)
>>>>
>>>> Now, onto Leo. What I really want is the ability to embed such a URL in
>>>> a Leo node body and have the 'CTRL-click' shortcut bring up the email.
>>>> That
>>>> is, I want the construct:
>>>>
>>>> @url outlook:00000000BB1BBDFACA3A... 84000026F87CCA0000
>>>> # or possibly
>>>> @url outlook://00000000BB1BBDFACA3A... 84000026F87CCA0000
>>>>
>>>> to work with ctrl-click.
>>>>
>>>> I have started to experiment with this but am getting errors related to
>>>> 'outlook protocol not supported', I think because only file:// and
>>>> http[s]:// are expected, (I'm looking around 'def handleUrl() in file
>>>> leoGlobals.py)
>>>>
>>>> I'm having a poke around here but would probably benefit from a bit of
>>>> guidance. Would there be any chance of getting something like this
>>>> facility
>>>> added to Leo?
>>>>
>>>> Thanks a lot
>>>> Jon N
>>>>
>>>> Refs: to
>>>> (a) enable the 'outlook:' protocol in Windows
>>>> (b) have the facility in Outlook to capture the URL of an email to the
>>>> lipboard or similar
>>>> (c) invoke the URL in some way to bring up the referenced email.
>>>>
>>>> http://www.slipstick.com/problems/outlook-missing-outlook-protocol/
>>>>
>>>> http://superuser.com/questions/834019/using-outlook-protocol-open-current-instance-of-outlook-not-new-instance
>>>>
>>>>
>>>> http://www.davidtan.org/create-hyperlinks-to-outlook-messages-folders-contacts-events/
>>>>
>>>> http://www.slipstick.com/outlook/using-outlook-links/
>>>>
>>>>
>> Well, it works with me (as I say, having gone through some hoops) with
>> Outlook 2010. IIRC I had to:
>>
>> 1) add a registry entry to enable the outlook: protocol # not sure where
>> this 'enabling' is done...
>> 2) enable macros in Outlook
>> 3) write an Outlook macro to allow me to copy the URL of a mail item to
>> the clipboard
>>
>> I then did:
>>
>> a) copy the URL of an email to the clipboard, using the above macro
>> b) paste the URL from the clipboard in the format
>> ""outlook:00000000BB1B..." as above
>> c) use this in the python snippets as above; the email is brought up in a
>> new window, hurrah
>>
>> So I now want to be able to turn step ( c ) into "ctrl-click on an
>> outlook: URL entry in a node" within Leo.
>>
>> Regards
>> Jon N
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "leo-editor" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/leo-editor.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.