Sending a Right to Left email from Access

G

Gal Zilberman

Hi
I'm trying to send a Right to Left Email from access.
I'm trying to find a way for the text to be aligned to the right and to be
written from the Right to the Left.
I'm not using the
DoCmd.SendObject , , , , , , strSubject, strMsg
code as I can't find a way pass the RTL ref into it.
I'm trying to use the Outlook VBA to do this but I can't find the way to do
this.
This is my current code:

' Vars
Dim strMsg As String
Dim strSubject
Dim olApp As New Outlook.Application
Dim olNameSpace As Outlook.NameSpace
Dim olMail As Outlook.MailItem
' Open an Outlook object
Set olNameSpace = olApp.GetNamespace("MAPI")
Set olMail = olApp.CreateItem(olMailItem)
' Message text
strMsg = "The message text"
strSubject = "Subject Line text"
' Open message
With olMail
.Subject = strSubject
.BodyFormat = olFormatRichText
.Body = strMsg
.Display
End With

thanks for your help

Gal
 
D

Dmitry Streblechenko

Instead of setting the Body property, set the HTMLBody to a formatted HTML
text.
You can also try to set the MailItem.InternetCodepage property to an
appropriate code page.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
D

Dmitry Streblechenko

So did you try to set the HTMLBody property to an HTML string that specifies
the right alignment?
<p align="right">...</p>

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Gal Zilberman

Hi Dmitry
unfortunately this doesn't do the trick, the text is still displayed from
left to right.
What I'm looking for is the ability to change the paragraph format, as in
the menu:
Format - Paragraph - Direction - Right to left

The codepage I'm using is 1255 btw.

Gal
 
G

Gal Zilberman

Oops
Thank you, sorry, I missed that.

I would have still liked to find a way to change the paragraph direction and
using rtf format, but this is a very good solution.

thanks again

Gal
 
G

Gal Zilberman

Just wanted to add one last thing.
The best result is using direction : rtl

<P style="direction: rtl"> ... </P>

Gal
 
G

Gal Zilberman

Thanks again
I'm using HTML with direction:rtl. This is exactly what I needed.

Gal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top