js实现word生成书签_几个javascript操作word的参考代码

/*

给几个js写word的参考:

this.Word.Selection.Font.Size = 16; //字体大小

this.Word.Selection.Font.Bold = true; //是否加粗

this.Word.Selection.ParagraphFormat.Alignment = 2; //0左对齐,1居中,2右对齐,数字只能0-9,慢慢试吧

this.Word.Selection.InsertRowsBelow(1); //下面加入一行

this.Word.Selection.MoveRight(1); //光标右移

this.Word.Selection.TypeText(string); //只能写string

this.Word.Selection.MoveDown(); //光标下移

this.Word.Selection.EndKey(); //光标移动到末尾

this.Word.ActiveDocument.Sections(1).Headers(1).Range.InsertAfter(string); //写页眉,结尾处写

this._LoadData = function () {

//替换函数,用于替换$strFld$类型的文本

 function replace( Range, strFld ) {

//[FindText], [MatchCase], [MatchWholeWord], [MatchWildcards], [MatchSoundsLike], [MatchAllWordForms], [Forward], [Wrap], [Format], [ReplaceWith], [Repla

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值