Word Vba修改页边距、纸张纵向、装定线等的代码
下面的WAPP是事先定义的word文档工程变量。以下代码为通过VBA代码来页面的页边距、纸张纵向、装定线、页眉页静等。WApp。ActiveDocument。PageSetup。LineNumbering。Active =0;//行编号WApp。
ActiveDocument。PageSetup。Orientation =Microsoft。Office。Interop。Word。WdOrientation。wdOrientPortrait;//页面方向WApp。ActiveDocument。
PageSetup。TopMargin =WApp。CentimetersToPoints(float。Parse("2。54"));//上页边距WApp。ActiveDocument。PageSetup。BottomMargin = WApp。
CentimetersToPoints(float。Parse("2。54"));//下页边距WApp。ActiveDocument。PageSetup。LeftMargin = WApp。CentimetersToPoints(float。
Parse("3。17"));//左页边距WApp。ActiveDocument。PageSetup。RightMargin = WApp。CentimetersToPoints(float。Parse("3。17"));//右页边距WApp。
ActiveDocument。PageSetup。Gutter = WApp。CentimetersToPoints(float。Parse("0"));//装订线位置WApp。ActiveDocument。PageSetup。HeaderDistance = WApp。
CentimetersToPoints(float。Parse("1。5"));//页眉WApp。ActiveDocument。PageSetup。FooterDistance = WApp。CentimetersToPoints(float。
Parse("1。75"));//页脚WApp。ActiveDocument。PageSetup。PageWidth = WApp。CentimetersToPoints(float。Parse("21"));//纸张宽度WApp。ActiveDocument。
PageSetup。PageHeight = WApp。CentimetersToPoints(float。Parse("29。7"));//纸张高度WApp。ActiveDocument。PageSetup。FirstPageTray = Microsoft。
Office。Interop。Word。WdPaperTray。wdPrinterDefaultBin;//纸张来源WApp。ActiveDocument。PageSetup。OtherPagesTray = Microsoft。Office。
Interop。Word。WdPaperTray。wdPrinterDefaultBin;//纸张来源WApp。ActiveDocument。PageSetup。SectionStart = Microsoft。Office。Interop。
Word。WdSectionStart。wdSectionNewPage;//节的起始位置:新建页WApp。ActiveDocument。PageSetup。OddAndEvenPagesHeaderFooter = 0;//页眉页脚-奇偶页不同WApp。
ActiveDocument。PageSetup。DifferentFirstPageHeaderFooter = 0;//页眉页脚-首页不同WApp。ActiveDocument。PageSetup。VerticalAlignment = Microsoft。
Office。Interop。Word。WdVerticalAlignment。wdAlignVerticalTop;//页面垂直对齐方式WApp。ActiveDocument。PageSetup。SuppressEndnotes =0;//不隐藏尾注WApp。
ActiveDocument。PageSetup。MirrorMargins = 0;//不设置首页的内外边距WApp。ActiveDocument。PageSetup。TwoPagesOnOne = false;//不双面打印WApp。ActiveDocument。
PageSetup。BookFoldPrinting =false;//不设置手动双面正面打印WApp。ActiveDocument。PageSetup。BookFoldRevPrinting =false;//不设置手动双面背面打印WApp。
ActiveDocument。PageSetup。BookFoldPrintingSheets = 1;//打印默认份数WApp。ActiveDocument。PageSetup。GutterPos = Microsoft。Office。Interop。
Word。WdGutterStyle。wdGutterPosLeft;//装订线位于左侧WApp。ActiveDocument。PageSetup。LinesPage = 40;//默认页行数量WApp。ActiveDocument。PageSetup。
LayoutMode = Microsoft。Office。Interop。Word。WdLayoutMode。wdLayoutModeLineGrid;//版式模式为“只指定行网格”。
答:详情>>
答:技术主管就要对自己所管理的技术感兴趣,并且能够认真主动的去学习其技术,将自己的技术不断更新,技术主管还要负责对自己主管的人员进行定期技术例会讨论并总结技术人员的...详情>>
答:炒股,买卖期货,开网络店铺。呵呵。。详情>>