![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Thanks everybody por the answers!
I solved my problem using ..HTMLFormat ..text = file that "file" is the code read from the .doc file saved as html file. "Michael Bauer" escreveu: Am Wed, 28 Dec 2005 04:24:02 -0800 schrieb Marcelo: Somehow I failed to notice what your real question is... The Body property is for plain text only. I.e. there´re no formattings possible. Use the HTMLBody property instead for html formatted text. You could save the Document as an HTML file and then read its content (e.g. with the Scripting.FileSystemObject). -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook It's a great idea, but I'm still with a doubt. I have already the text copyed from doc Word, but when I paste it in the mail body, I lost the format. I'm Using: objMail.Body = oWord.Selection.FormattedText Why isn't it working? "Michael Bauer" escreveu: Am Tue, 27 Dec 2005 17:54:02 -0800 schrieb Marcelo: Marcelo, you can use Word´s object model to access any document. In Outlook add a reference to Word via Tools/References. Now you can easily explore Word´s object model with the object browser (F2). Reference on an opened Document: Application.Documents.Item(index) Open a new Document: Application.Documents.Open(...) All the Documents text is Document.Range.Text -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Hi, I would like some help with creating an e-mail with macro. I have a macro to create an e-mail, and I want that the body of the e-mail come from a ..doc file. Any help? By the way, here it is the simple following macro to do this: Sub CreateMail() Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application Set objMail = olApp.CreateItem(olMailItem) With objMail .Display .Subject = "Test" .Importance = olImportanceHigh .ReadReceiptRequested = True .Sensitivity = olNormal .Attachments.Add ("C:\Documents and Settings\Desktop\Test.txt") .To = " .Body = "Can I use MsWord?" .Save End With End Sub An easy question: how do I do to close the objMail? objMail.Close is not working Thanks on advance, Marcelo |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I change the body of an appointment | Raphael | Outlook - Calandaring | 1 | February 16th 06 06:36 PM |
Blank Body on emails | Jim McColl | Outlook Express | 3 | February 3rd 06 08:51 PM |
HTML in mail body - no display with Word option checked | Sue Mosher [MVP-Outlook] | Outlook and VBA | 0 | February 1st 06 04:14 PM |
how to change the mail message body | Ram | Add-ins for Outlook | 10 | January 27th 06 05:21 PM |
How can I increase the mail body length when using mailto? | maxrael | Outlook and VBA | 3 | January 13th 06 10:17 PM |