word中的超链接为什么加了个大括号
ShowVisualBasicEditor = TrueActiveDocument.Shapes.AddTextEffect(msoTextEffect26, _"【解析】人们研制了许许多多计算机程序设计语言,其中二进制", "宋体", 36#, msoFalse, msoFalse, -190.95 _, 92.8).SelectShowVisualBasicEditor = True
word中如何超链接到本word中的某个句?
如果你想要其链接到 某个句子的话,你要把这个句子的位置上添加一个标签 这个标签可以是隐藏的,并用那个句子中的关键词命名……然后你在设置超链接的时候 就可以按着提示操作了……还有 如果你要链接的句子 已经是一个标题了的话,你可以直接引用 即可……标签的插入 与 超链接相似……都是在 菜单 插入 里边……详细的 到 打开的窗口中就可以看到,只要按步骤做就可以了……
word中公式3.0问题
用宏自定义一个快捷键。
点菜单的工具,宏,录制,键盘,设定快捷键比如 Ctrl+i,确定。
工具,宏,停止录制。
工具,宏,查看,把下面这句话复制到录制好的Sub 与End Sub之间:Selection.InlineShapes.AddOLEObject ClassType:="Equation.3", FileName:="", LinkToFile:=False, DisplayAsIcon:=False回到Word,光标移到想插入公式的地方,同时按Ctrl和i,就可以了。
java怎么实现在线打开word时给word加水印?
package com.ymo.word; import com.jacob.activeX.ActiveXComponent; import com.jacob.com.ComThread; import com.jacob.com.Dispatch; import com.jacob.com.Variant; public class TestJacobWord { private ActiveXComponent wrdCom = null; private Dispatch doc = null; private Dispatch activeDoc = null; private Dispatch docSelect = null; private Dispatch docs = null; private static TestJacobWord instance = null; private String docName = ""; public static TestJacobWord getInstance() { if (instance == null) { instance = new TestJacobWord(); } return instance; } private boolean initWord() { boolean flag = false; ComThread.InitSTA(); wrdCom = new ActiveXComponent("word.Application"); try { docs = wrdCom.getProperty("Documents").toDispatch(); wrdCom.setProperty("Visible", new Variant(false)); flag = true; } catch (Exception e) { flag = false; e.printStackTrace(); } return flag; } private void createNewDocument() { doc = Dispatch.call(docs, "Add").toDispatch(); docSelect = Dispatch.get(wrdCom, "Selection").toDispatch(); } private void getActiveDoc() { activeDoc = wrdCom.getProperty("ActiveWindow").toDispatch(); System.out.println(activeDoc.getProgramId()); } private void openDocument(String docPath) { if (this.doc != null) { closeDocument(); } this.doc = Dispatch.call(docs, "Open", docPath, new Variant(false),new Variant(false)).toDispatch(); docSelect = Dispatch.get(wrdCom, "Selection").toDispatch(); } private void closeDocument() { if (doc != null) { Dispatch.call(doc, "Save"); Dispatch.call(doc, "Close", new Variant(true)); doc = null; } } private void setImgWaterMark(String waterMarkPath) { Dispatch activePan = Dispatch.get(activeDoc, "ActivePane").toDispatch(); Dispatch view = Dispatch.get(activePan, "View").toDispatch(); Dispatch.put(view, "SeekView", new Variant(9)); Dispatch headfooter = Dispatch.get(docSelect, "HeaderFooter").toDispatch();// 取得图形对象 Dispatch shapes = Dispatch.get(headfooter, "Shapes").toDispatch(); Dispatch pic = Dispatch.call(shapes, "AddPicture", waterMarkPath).toDispatch(); Dispatch.call(pic, "Select"); Dispatch.put(pic, "Left", new Variant(10)); Dispatch.put(pic, "Top", new Variant(200)); Dispatch.put(pic, "Width", new Variant(150)); Dispatch.put(pic, "Height", new Variant(80)); Dispatch.put(view, "SeekView", new Variant(0)); } public void setTextWaterMark(String waterMarkStr) { Dispatch activePan = Dispatch.get(activeDoc, "ActivePane").toDispatch(); Dispatch view = Dispatch.get(activePan, "View").toDispatch(); Dispatch.put(view, "SeekView", new Variant(9)); Dispatch headfooter = Dispatch.get(docSelect, "HeaderFooter").toDispatch(); Dispatch shapes = Dispatch.get(headfooter, "Shapes").toDispatch(); Dispatch selection = Dispatch.call(shapes, "AddTextEffect",new Variant(9), waterMarkStr, "宋体", new Variant(1),new Variant(false), new Variant(false), new Variant(0),new Variant(0)).toDispatch(); Dispatch.call(selection, "Select"); Dispatch shapeRange = Dispatch.get(docSelect, "ShapeRange").toDispatch(); Dispatch.put(shapeRange, "Name", "PowerPlusWaterMarkObject1"); Dispatch textEffect = Dispatch.get(shapeRange, "TextEffect").toDispatch(); Dispatch.put(textEffect, "NormalizedHeight", new Boolean(false)); Dispatch line = Dispatch.get(shapeRange, "Line").toDispatch(); Dispatch.put(line, "Visible", new Boolean(false)); Dispatch fill = Dispatch.get(shapeRange, "Fill").toDispatch(); Dispatch.put(fill, "Visible", new Boolean(true));// 设置水印透明度 Dispatch.put(fill, "Transparency", new Variant(0.5)); Dispatch foreColor = Dispatch.get(fill, "ForeColor").toDispatch(); Dispatch.put(foreColor, "RGB", new Variant(16711620)); Dispatch.call(fill, "Solid");// 设置水印旋转 Dispatch.put(shapeRange, "Rotation", new Variant(315)); Dispatch.put(shapeRange, "LockAspectRatio", new Boolean(true)); Dispatch.put(shapeRange, "Height", new Variant(117.0709)); Dispatch.put(shapeRange, "Width", new Variant(468.2835)); Dispatch.put(shapeRange, "Left", new Variant(-999995)); Dispatch.put(shapeRange, "Top", new Variant(-999995)); Dispatch wrapFormat = Dispatch.get(shapeRange, "WrapFormat").toDispatch();// 是否允许交叠 Dispatch.put(wrapFormat, "AllowOverlap", new Variant(true)); Dispatch.put(wrapFormat, "Side", new Variant(3)); Dispatch.put(wrapFormat, "Type", new Variant(3)); Dispatch.put(shapeRange, "RelativeHorizontalPositi on", new Variant(0)); Dispatch.put(shapeRange, "RelativeVerticalPosition", new Variant(0)); Dispatch.put...
高分悬赏,如何用vba在word每一页都插入一个文本框
可以先插入页,再逐个跳到相应页码,下面的代码 在2个页中插入2个文本框,没有问题:Sub InsText()Set DocNew = ActiveDocumentDocNew.Paragraphs(1).Range.InsertAfter " "DocNew.Paragraphs(1).Range.InsertBreakSet NewT = DocNew.Shapes.AddTextbox(1, 130, 150, 80, 20)NewT.TextFrame.TextRange.InsertAfter "Hello world 1"Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Name:=2Set NewT2 = DocNew.Shapes.AddTextbox(1, 130, 150, 80, 20)NewT2.TextFrame.TextRange.InsertAfter "Hello world 2"End Sub如果页码多,可以用For循环
.net页面导出word不显示图片
用普通的保存成word的代码是不能实现的,我曾经是用c#引用Microsoft.Office.Interop.Word来创建word,才能在其中添加图片,不知道对你有没有用:Object Nothing = System.Reflection.Missing.Value;Directory.CreateDirectory("C:/CNSI"); //创建文件所在目录string name = "CNSI_" + DateTime.Now.ToShortDateString()+ ".doc";object filename = "C://CNSI//" + name; //文件保存路径//创建Word文档Application WordApp = new ApplicationClass();Document WordDoc = WordApp.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing);//插入图片string FileName = Server.MapPath("~/http_imgloadCADN55WM.jpg");//图片所在路径object LinkToFile = false;object SaveWithDocument = true;object Anchor = WordDoc.Application.Selection.Range;WordDoc.Application.ActiveDocument.InlineShapes.AddPicture(FileName, ref LinkToFile, ref SaveWithDocument, ref Anchor);// WordDoc.Application.ActiveDocument.InlineShapes[1].Width = 100f;//图片宽度// WordDoc.Application.ActiveDocument.InlineShapes[1].Height = 100f;//图片高度//文件保存WordDoc.SaveAs(ref filename, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing);WordDoc.Close(ref Nothing, ref Nothing, ref Nothing);WordApp.Quit(ref Nothing, ref Nothing, ref Nothing);
我电脑word里显示的是“链接”不是“超链接”,而且输入地址后确...
WORD目录添加超链接方法如下:1、打开word;2、选择需要插入超链接的目录;3、右击->超链接;4、在弹出的窗口选择本文档中的位置,选择要连接到的标题处;5、确定,完成。
转载请注明出处51数据库 » word shapes.addpictu