如何将此文本对齐LEFT [英] How to align this text LEFT

查看:82
本文介绍了如何将此文本对齐LEFT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我我需要在此代码中添加哪些命令以将文本对齐到左边?!?



Could somebody please tell me what command I need to add to this code to Align the text to the Left ?!?

Set WordApp = Nothing
Set WordApp = New Word.Application
WordApp.Visible = True
WordApp.Activate
WordApp.WindowState = wdWindowStateMaximize
WordApp.Documents.Open "K:\Newsletters\Test\Current_Season\ZipFile\Test.rtf" 'myRtfDoc
WordApp.Selection.WholeStory
WordApp.Selection.Font.Name = "Courier New"
WordApp.Selection.Font.Size = 8
WordApp.Selection.PageSetup.LeftMargin = CentimetersToPoints(0.75)
WordApp.Selection.PageSetup.RightMargin = CentimetersToPoints(0.5)
WordApp.Selection.PageSetup.TopMargin = CentimetersToPoints(0.5)
WordApp.Selection.PageSetup.BottomMargin = CentimetersToPoints(0.5)
WordApp.WordBasic.TogglePortrait Tab:=3, PaperSize:=0, TopMargin:="0.75", _
    BottomMargin:="0.5", LeftMargin:="0.5", RightMargin:="0.5", Gutter:="0", _
    PageWidth:="29.7", PageHeight:="21", Orientation:=1, FirstPage:=0, _
    OtherPages:=0, VertAlign:=0, ApplyPropsTo:=0, FacingPages:=0, _
    HeaderDistance:="1.25", FooterDistance:="1.25", SectionStart:=2, _
    OddAndEvenPages:=0, DifferentFirstPage:=0, Endnotes:=0, LineNum:=0, _
    StartingNum:=1, FromText:=wdAutoPosition, CountBy:=0, NumMode:=0, _
    TwoOnOne:=0, GutterPosition:=0, LayoutMode:=0, CharsLine:=50, LinesPage:= _
    45, CharPitch:=220, LinePitch:=360, DocFontName:="+Body", DocFontSize:=11 _
    , PageColumns:=1, TextFlow:=0, FirstPageOnLeft:=0, SectionType:=1, _
    FolioPrint:=0, ReverseFolio:=0, FolioPages:=1
Selection.HomeKey Unit:=wdStory

推荐答案

已解决RyanDev





RyanDev在37分钟前

回复

在Word中,你可以只记录一个你想要的宏,然后就可以看到代码了。
Resolved by RyanDev


RyanDev at 37 mins ago
Reply
In Word, you can just record a macro doing what you want and then you can see the code.


这篇关于如何将此文本对齐LEFT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆