PC Review


Reply
Thread Tools Rate Thread

Cursor location in email item?

 
 
Bob Bridges
Guest
Posts: n/a
 
      20th Jan 2010
I do a respectable amount of coding in VBA/Access and /Excel, but hardly any
(so far) in Outlook. From the little bit of research I did today, Outlook is
a very different animal. Is there a user's guide or text that I should
tackle before doing anything serious in VBA/Outlook?

Specifically what I'm looking for is the location of the cursor. I have in
mind writing a subroutine that identifies the entire paragraph in which the
cursor is locating it, and setting certain formatting (typeface, size, color)
for the entire paragraph. I'll be using HTML and I've a little familiarity
with the DHTML object model, but the cursor location is eluding me so far.
 
Reply With Quote
 
 
 
 
Michael Bauer [MVP - Outlook]
Guest
Posts: n/a
 
      20th Jan 2010


Outlook itself doesn't support that. But if Word is the email editor, you
can use the Word object model: The Inspector.WordEditor property returns a
Word.Document object.

--
Best regards
Michael Bauer - MVP Outlook
Manage and share your categories:
<http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 19 Jan 2010 22:16:01 -0800 schrieb Bob Bridges:

> I do a respectable amount of coding in VBA/Access and /Excel, but hardly

any
> (so far) in Outlook. From the little bit of research I did today, Outlook

is
> a very different animal. Is there a user's guide or text that I should
> tackle before doing anything serious in VBA/Outlook?
>
> Specifically what I'm looking for is the location of the cursor. I have

in
> mind writing a subroutine that identifies the entire paragraph in which

the
> cursor is locating it, and setting certain formatting (typeface, size,

color)
> for the entire paragraph. I'll be using HTML and I've a little

familiarity
> with the DHTML object model, but the cursor location is eluding me so far.

 
Reply With Quote
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      20th Jan 2010
In the future, please give your Outlook version, because there are
significant differences between versions. Michael's advice applies to
Outlook 2007 and also Outlook 2003 with Word as the email editor. For
Outlook 2003 with the built-in editor, see
http://www.outlookcode.com/codedetail.aspx?id=1358 for a code sample that
shows how to work with the HTMLDocument and its Selection.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Bob Bridges" <(E-Mail Removed)> wrote in message
news:68622F50-C86F-4B56-AED5-(E-Mail Removed)...
>I do a respectable amount of coding in VBA/Access and /Excel, but hardly
>any
> (so far) in Outlook. From the little bit of research I did today, Outlook
> is
> a very different animal. Is there a user's guide or text that I should
> tackle before doing anything serious in VBA/Outlook?
>
> Specifically what I'm looking for is the location of the cursor. I have
> in
> mind writing a subroutine that identifies the entire paragraph in which
> the
> cursor is locating it, and setting certain formatting (typeface, size,
> color)
> for the entire paragraph. I'll be using HTML and I've a little
> familiarity
> with the DHTML object model, but the cursor location is eluding me so far.



 
Reply With Quote
 
Gabriel Fineman
Guest
Posts: n/a
 
      18th Aug 2010
I am using Outlook 2007 with VBA.
I Dim objDoc As Word.Document to set it up for the Word Object Model.
Then I Set objDoc = ActiveInspector.WordEditor to get the Word Object Model of the current mail item.
But then I do not see anything inside of objDoc that would give me the cursor location.
I want the cursor location to create a selection object.
Any ideas?

> On Wednesday, January 20, 2010 1:16 AM Bob Bridges wrote:


> I do a respectable amount of coding in VBA/Access and /Excel, but hardly any
> (so far) in Outlook. From the little bit of research I did today, Outlook is
> a very different animal. Is there a user's guide or text that I should
> tackle before doing anything serious in VBA/Outlook?
>
> Specifically what I am looking for is the location of the cursor. I have in
> mind writing a subroutine that identifies the entire paragraph in which the
> cursor is locating it, and setting certain formatting (typeface, size, color)
> for the entire paragraph. I will be using HTML and I have a little familiarity
> with the DHTML object model, but the cursor location is eluding me so far.



>> On Wednesday, January 20, 2010 3:26 AM Michael Bauer [MVP - Outlook] wrote:


>> Outlook itself does not support that. But if Word is the email editor, you
>> can use the Word object model: The Inspector.WordEditor property returns a
>> Word.Document object.
>>
>> --
>> Best regards
>> Michael Bauer - MVP Outlook
>> Manage and share your categories:
>> <http://www.vboffice.net/product.html?pub=6&lang=en>
>>
>>
>> Am Tue, 19 Jan 2010 22:16:01 -0800 schrieb Bob Bridges:
>>
>> any
>> is
>> in
>> the
>> color)
>> familiarity



>>> On Wednesday, January 20, 2010 7:57 AM Sue Mosher [MVP] wrote:


>>> In the future, please give your Outlook version, because there are
>>> significant differences between versions. Michael's advice applies to
>>> Outlook 2007 and also Outlook 2003 with Word as the email editor. For
>>> Outlook 2003 with the built-in editor, see
>>> http://www.outlookcode.com/codedetail.aspx?id=1358 for a code sample that
>>> shows how to work with the HTMLDocument and its Selection.
>>> --
>>> Sue Mosher, Outlook MVP
>>> Author of Microsoft Outlook 2007 Programming:
>>> Jumpstart for Power Users and Administrators
>>> http://www.outlookcode.com/article.aspx?id=54



>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>> Book Review: Excel 2010 - The Missing Manual [OReilly]
>>> http://www.eggheadcafe.com/tutorials...l-oreilly.aspx

 
Reply With Quote
 
Ken Slovak
Guest
Posts: n/a
 
      18th Aug 2010
Use the Selection object, which is a Range object.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Gabriel Fineman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am using Outlook 2007 with VBA.
> I Dim objDoc As Word.Document to set it up for the Word Object Model.
> Then I Set objDoc = ActiveInspector.WordEditor to get the Word Object
> Model of the current mail item.
> But then I do not see anything inside of objDoc that would give me the
> cursor location.
> I want the cursor location to create a selection object.
> Any ideas?
>
>> On Wednesday, January 20, 2010 1:16 AM Bob Bridges wrote:

>
>> I do a respectable amount of coding in VBA/Access and /Excel, but hardly
>> any
>> (so far) in Outlook. From the little bit of research I did today,
>> Outlook is
>> a very different animal. Is there a user's guide or text that I should
>> tackle before doing anything serious in VBA/Outlook?
>>
>> Specifically what I am looking for is the location of the cursor. I have
>> in
>> mind writing a subroutine that identifies the entire paragraph in which
>> the
>> cursor is locating it, and setting certain formatting (typeface, size,
>> color)
>> for the entire paragraph. I will be using HTML and I have a little
>> familiarity
>> with the DHTML object model, but the cursor location is eluding me so
>> far.

>
>
>>> On Wednesday, January 20, 2010 3:26 AM Michael Bauer [MVP - Outlook]
>>> wrote:

>
>>> Outlook itself does not support that. But if Word is the email editor,
>>> you
>>> can use the Word object model: The Inspector.WordEditor property returns
>>> a
>>> Word.Document object.
>>>
>>> --
>>> Best regards
>>> Michael Bauer - MVP Outlook
>>> Manage and share your categories:
>>> <http://www.vboffice.net/product.html?pub=6&lang=en>
>>>
>>>
>>> Am Tue, 19 Jan 2010 22:16:01 -0800 schrieb Bob Bridges:
>>>
>>> any
>>> is
>>> in
>>> the
>>> color)
>>> familiarity

>
>
>>>> On Wednesday, January 20, 2010 7:57 AM Sue Mosher [MVP] wrote:

>
>>>> In the future, please give your Outlook version, because there are
>>>> significant differences between versions. Michael's advice applies to
>>>> Outlook 2007 and also Outlook 2003 with Word as the email editor. For
>>>> Outlook 2003 with the built-in editor, see
>>>> http://www.outlookcode.com/codedetail.aspx?id=1358 for a code sample
>>>> that
>>>> shows how to work with the HTMLDocument and its Selection.
>>>> --
>>>> Sue Mosher, Outlook MVP
>>>> Author of Microsoft Outlook 2007 Programming:
>>>> Jumpstart for Power Users and Administrators
>>>> http://www.outlookcode.com/article.aspx?id=54

>
>
>>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>>> Book Review: Excel 2010 - The Missing Manual [OReilly]
>>>> http://www.eggheadcafe.com/tutorials...l-oreilly.aspx


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Last Cursor Location Bill G Microsoft Word Document Management 6 15th Sep 2009 06:13 PM
Cursor location BrettG Microsoft Word Document Management 1 12th Nov 2007 12:09 PM
How do I change cursor location default when replying to email? =?Utf-8?B?T2hKb2FubmE=?= Microsoft Outlook Discussion 0 1st Nov 2007 04:34 AM
email reply cursor location in "to" field =?Utf-8?B?ZGF2ZXRoZWo=?= Microsoft Outlook Discussion 0 1st Feb 2005 08:35 PM
ADO Cursor location SKG Microsoft ASP .NET 1 11th Aug 2004 06:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 AM.