Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

set left-to-right for 1 line in the footer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
4tis - 15 Sep 2006 23:41 GMT
hi
i am using a VBA code which manipulate some text line in the footer.
my problem is that the text is mixed with 2 language so, i need the
text  to be "align left" and the "left-to-right" in the button.
my problem - i can make the text "align left" but cannot make it
"left-to-right"
the relevent code i am using is :

-------------------------------------------------------------------------------------------------------------------
Dim lngJunk As Long
Dim oStoryRange As Word.Range
Dim oFld As Field
lngJunk = ActiveDocument.Sections(1).Headers(1).Range.StoryType
For Each oStoryRange In ActiveDocument.StoryRanges
 Select Case oStoryRange.StoryType
 Case Is = 8, 9, 11
   Do
     With oStoryRange.Find
          .MatchWildcards = True
          .Text = "/*/*/[0-9]"
          .Replacement.Text = "/àéúé/maui/3"
          .Replacement.Font.Name = "Arial"
          .Replacement.Font.Size = 10
          .Replacement.Application.Selection.LtrPara
          .Replacement.LanguageID = wdEnglishUS
          .Replacement.ParagraphFormat.Alignment =
wdAlignParagraphLeft
'           .Replacement.ParagraphFormat.TextDirection =
pbTextDirectionRightToLeft

          .Execute Replace:=wdReplaceAll

          If .Found = True Then

          End If

      End With

     Set oStoryRange = oStoryRange.NextStoryRange
   Loop Until oStoryRange Is Nothing
 Case Else
  'Do Nothing
 End Select
Next
-----------------------------------------------------------------------------------------------------------------

the line ".Replacement.ParagraphFormat.TextDirection =
pbTextDirectionRightToLeft" is not working here because he is not
recognize the ".TextDirection" in the Range.

any idea what can i do ?
i am realy despert.
thank you in advanced
Russ - 09 Oct 2006 02:07 GMT
4tis,
See below.
> hi
> i am using a VBA code which manipulate some text line in the footer.
[quoted text clipped - 51 lines]
> i am realy despert.
> thank you in advanced

Have you tried recording a macro while manually switching languages and
doing what you want Word to do?
Link for Word info about features for right to languages:
http://office.microsoft.com/en-us/assistance/HP052585671033.aspx
Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.