[python-win32] Catching Send To in Office

Tony Cappellini cappy2112 at gmail.com
Thu Mar 24 15:14:21 CET 2011


When you launch Word and Excel, you can manipulate them via COM and try to
intercept, which is a pain but at least you can
control them from Python. You may be able to intercept SendTo this way.

If you launch Word with your own template file (.dot) it may be possible to
embed a Word macro in the template that helps you to intercept sendTo.


On Thu, Mar 24, 2011 at 6:04 AM, Mike Driscoll
<mdriscoll at co.marshall.ia.us>wrote:

> Hi Tony,
>
>
> On 1:59 PM, Tony Cappellini wrote:
>
>>
>>
>> On 1:59 PM, Tim Roberts wrote:
>> > Mike Driscoll wrote:
>> >> Does anyone know of a way to catch the "Send To Mail Recipient" in
>> >> Microsoft Word or Excel? I want to redirect that to our web mail
>> >> somehow.
>> > Well, let's brainstorm for a moment.  That link fires up the "default
>> > mail provider" for your computer, which in found in the registry.
>> > Theoretically, you ought to be able to rewrite that key to a browser
>> > command that brings up your webmail page, or to an application that does
>> > the same thing.  Check HKCU\Software\Clients\Mail or
>> > HKLM\Software\Clients\Mail.
>> >
>>
>> Mike,
>>
>> If I've understood you correctly ...
>> Why not just create a new sendto shortcut which points to your
>> application,
>> and copy it to the SendTo directory?
>>
>> I've created custom sendtos before, and it's quite convenient to make
>> sendtos for other systems.
>> You then just right click and send entire directories across the network
>> like this.
>>
>>
>>
>>
>>
> I think I know how to do the Send To right-click stuff now (thanks to the
> guys on this list and on wxPython IRC), the problem is catching the Send To
> inside MS Word, Excel, etc. They are not using the same process. Maybe I
> need to create my own VBA junk in them that does it for me. I'm going to try
> using procmon to try to see what Word is doing. If anyone has any ideas,
> that would be great. Thanks!
>
> - Mike
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110324/c7470f4c/attachment.html>


More information about the python-win32 mailing list