English 中文(简体)
微软Word - 动态图纸,载于超文本文档和附录,可能吗?
原标题:Microsoft Word - Dynamically Pull in HTML File and Append It - Possible?

文字文件是否具备介绍动态信息的能力? 我想做的是,文件在文件开启时,总是动态地将超文本文档的内容输入,并在文件结尾处附上。

任何人都知道这是否可行?

问题回答

将以下内容列入法典模块。 <代码>AutoOpen在文件开放时每次都使用。

Public Sub AutoOpen()
    Dim currentDocument As Document
    Set currentDocument = ActiveDocument

    Dim sourceDocument As Document
    Set sourceDocument = Application.Documents.Open(FileName:="e:mySourceName.docx")
    sourceDocument.Range.Copy
    sourceDocument.Close wdDoNotSaveChanges
    Set sourceDocument = Nothing

    Dim pasteRange As Range
    Set pasteRange = currentDocument.Range
    pasteRange.Collapse wdCollapseEnd

    pasteRange.Paste
End Sub




相关问题
What does it mean "to write a web service"?

I just asked a question about whether it was possible to write a web-page-checking code and run it from free web server, and one supporter answered and said that it was possible only if I run "a web ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Why does Scala create a ~/tmp directory when I run a script?

When I execute a Scala script from the command line, a directory named "tmp" is created in my home directory. It is always empty, so I simply deleted it without any apparent problem. Of course, when I ...

Ivy, ant and start scripts

I have a project that uses ant to build and ivy for dependencies. I would like to generate the start scripts for my project, with the classpath, based on the dependencies configured in Ivy, ...

热门标签