I have created a program in Excel VBA, this program copy from Word document content and paste it to the mail body. But I have tried to change the direction of one text in the document and used .ParagraphFormat.Alignment but it didn't work.
I tried this code
Sub sendMail()
Dim ol As Outlook.Application
Dim olm As Outlook.MailItem
Dim wd As Word.Application
Dim doc As Word.Document
Dim Cell As Range
For r = 23 To Sheet1.Cells(Rows.Count, 21).End(xlUp).Row
With wd.Selection.Find
.Text = "<<Duration>>"
.Replacement.Text = Sheet1.Cells(r, 32).Value
.Execute Replace:=wdReplaceAll
End With
With wd.Selection.Find
.Text = "<<objectivs>>"
.ParagraphFormat.Alignment = wdAlignParagraphLeft 'this code suppose to change the direction but it didn't work
.Replacement.Text = Sheet1.Cells(r, 33).Value
.Execute Replace:=wdReplaceAll
End With
Next
End Sub
Try