A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

write and format a piece of text in the body using vba



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 13th 09, 11:29 AM posted to microsoft.public.outlook.program_vba
Screaming Eagles 101
external usenet poster
 
Posts: 15
Default write and format a piece of text in the body using vba

Hi,

I would like to write a piece of text inside of the message body, using a
certain font,
without losing the rest of the mail.

I tried this using
objItem.Body = "a piece of text" but then I lose all the rest, signature
included.

Using settext and gettext + the clipboard I lose all formatting of the
copied body text.

Is there a way to write a piece of text at the cursor location without
losing all the body text ?



Ads
  #2  
Old November 13th 09, 02:25 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default write and format a piece of text in the body using vba

Outlook version? If Outlook 2003 or earlier, is Word the email editor?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


" Screaming Eagles 101" wrote in message
...
Hi,

I would like to write a piece of text inside of the message body, using a
certain font,
without losing the rest of the mail.

I tried this using
objItem.Body = "a piece of text" but then I lose all the rest, signature
included.

Using settext and gettext + the clipboard I lose all formatting of the
copied body text.

Is there a way to write a piece of text at the cursor location without
losing all the body text ?





  #3  
Old November 13th 09, 04:31 PM posted to microsoft.public.outlook.program_vba
Screaming Eagles 101
external usenet poster
 
Posts: 15
Default write and format a piece of text in the body using vba

Is indeed 2003 and I write my mails directly in Outlook

"Sue Mosher [MVP]" wrote in message
...
Outlook version? If Outlook 2003 or earlier, is Word the email editor?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


" Screaming Eagles 101" wrote in message
...
Hi,

I would like to write a piece of text inside of the message body, using a
certain font,
without losing the rest of the mail.

I tried this using
objItem.Body = "a piece of text" but then I lose all the rest, signature
included.

Using settext and gettext + the clipboard I lose all formatting of the
copied body text.

Is there a way to write a piece of text at the cursor location without
losing all the body text ?







  #4  
Old November 13th 09, 04:56 PM posted to microsoft.public.outlook.program_vba
JP[_3_]
external usenet poster
 
Posts: 201
Default write and format a piece of text in the body using vba

You have to use a line like this:

objItem.Body = "a piece of text" & objItem.Body

--JP

On Nov 13, 5:29*am, " Screaming Eagles 101"
wrote:
Hi,

I would like to write a piece of text inside of the message body, using a
certain font,
without losing the rest of the mail.

I tried this using
objItem.Body = "a piece of text" but then I lose all the rest, signature
included.

Using settext and gettext + the clipboard I lose all formatting of the
copied body text.

Is there a way to write a piece of text at the cursor location without
losing all the body text ?


  #5  
Old November 14th 09, 03:26 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default write and format a piece of text in the body using vba

If you're using the Outlook editor and not the Word editor, then you have to
use different approaches for HTML and RTF messages. For HTML, use
Inspector.HTMLEditor, as demonstrated in the sample at
http://www.outlookcode.com/codedetail.aspx?id=1358. For RTF, you'd have to
use the SafeInspector object from the third-party Outlook Redemption
library.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


" Screaming Eagles 101" wrote in message
...
Is indeed 2003 and I write my mails directly in Outlook

I would like to write a piece of text inside of the message body, using
a certain font,
without losing the rest of the mail.

I tried this using
objItem.Body = "a piece of text" but then I lose all the rest, signature
included.

Using settext and gettext + the clipboard I lose all formatting of the
copied body text.

Is there a way to write a piece of text at the cursor location without
losing all the body text ?



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't write into message form body [email protected] Outlook - Using Forms 1 July 19th 07 06:18 PM
I can't write any text Pablo Casaubon Outlook - General Queries 2 May 20th 07 04:00 PM
Write RTF-Body on ItemSend event Thomas Add-ins for Outlook 2 February 12th 07 12:22 PM
Mail Merge - Format/Send Text and HTML Format srm Outlook - General Queries 0 January 17th 07 07:15 PM
taille de ma piece jointe ou d'un document que je recois en piece jointe christian CHARLOT Outlook Express 1 February 22nd 06 03:00 PM


All times are GMT +1. The time now is 08:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.