Cursor location in email item?

Status
Not open for further replies.
B

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.
 
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

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.
 
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

"Bob Bridges" <rhbridg.RemoveThisNode@attglobal.net> wrote in message

news:68622F50-C86F-4B56-AED5-FC94F826CE3A@microsoft.com...
> 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.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
F Insert date at cursor location Outlook VBA and Custom Forms 4
J Outlook 365 Add keywords from Listbox to the message body where cursor is placed Outlook VBA and Custom Forms 0
Witzker Outlook 2019 Macro to check Cursor & Focus position Outlook VBA and Custom Forms 8
Witzker Set Cursor & Focus from any field to the body of a user Contact form in OL 2019 Outlook VBA and Custom Forms 1
Witzker Place cursor at opening, a user defined OL contact form Outlook VBA and Custom Forms 3
M When I click “new message” in outlook, my cursor defaults to the body of the m Using Outlook 6
K Placing cursor over an email name it would show the name of the person Using Outlook 1
R Test if cursor is in To... field Outlook VBA and Custom Forms 1
T current cursor position in the reply event Outlook VBA and Custom Forms 1
L Location Unsafe Warning for Links Using Outlook 1
K Changing the Deleted Items location in Outlook 2019 Using Outlook 2
T Outlook 365 Search Box reverting to old location Using Outlook 2
C "The linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify that the link points to the correct file location" Using Outlook 1
D VBA Macro to Print and Save email to network location Outlook VBA and Custom Forms 1
S Navigation Pane Location And Options Using Outlook 19
DoctorJellybean Use OST file location for fresh installation? Using Outlook 1
O Calendar - Location: what happens when using my own way of entering locations Using Outlook 1
M Reverting The Outlook Search Box Location (or other undesired additions) Using Outlook 1
T Changing Sent Items location in Outlook 2019 Using Outlook 0
N Free/busy publish at http location does not work Using Outlook 1
L New Location for the Search Bar Using Outlook 6
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
DoctorJellybean Preserve OST file location in new installation? Using Outlook 4
S Moving .OST file location unsuccessful! Using Outlook 6
W Appointment occurrences change the location property Using Outlook 0
A Missing context menu on Location field Using Outlook 2
V Change default default save location to Quick Access Using Outlook 1
T Remove Old Location From Tasks Pane Using Outlook 1
Diane Poremsky Meeting Location Warning Message Using Outlook 0
Kika Melo Change location of Outlook SecureTemporary Files Folder Using Outlook 5
Pierce007 Maps/location in making an appointment Using Outlook 2
J Live Meeting Location populate from body Outlook VBA and Custom Forms 4
K After Carbonite restore pst files are found in a weird location Using Outlook 2
M Save selected email message as .msg file (with user to choose folder location) Outlook VBA and Custom Forms 14
Tech Checkers Make Outlook add Contact Card Address in Location Field based on Appointment Subject Name. Using Outlook 2
moron save as & file location dialog box popup Outlook VBA and Custom Forms 2
H Can't change the location of the Data File (.ost) in Outlook 2013 Using Outlook 2
R Outlook will not send from home location Using Outlook 6
S Workgroup template file location? Using Outlook 2
L Cannot update Location field in Contacts - Runtime Error 438 Using Outlook 0
K Change the default Archive location via GPO in Outlook 2010 Using Outlook 3
P Trying to get 'Calendar Name' to appear like 'Subject' and 'Location' in event Using Outlook 0
S Holidays after 2012 & NOT displaying location Using Outlook 8
C Outlook 2010 - Default PST location Using Outlook 4
M Outlook 2003: Restore location Using Outlook 1
Z Mail delivery location - I think Using Outlook 1
T Location and simple copying of emails and settings, OL 2010 and Win 7 64bit. Using Outlook 3
J Remove location field from displaying Using Outlook 8
D Junk Mail location Using Outlook 1
D Extracting Location info from All Day Event in mailboxes into webpage Exchange Server Administration 3

Similar threads

Back
Top