如何为查找和替换创建宏 [英] How to create a macro for find&replace

查看:206
本文介绍了如何为查找和替换创建宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Word中有一个宏来翻译国际象棋符号。当我尝试在Expression Web 2中使用它时,程序崩溃了。它使用的句子如

WordBasic.EditReplace查找:= Str1 $,替换:= Str2 $,方向:= 0,MatchCase:= 1,WholeWord:= 0,PatternMatch:= 1,SoundsLike:= 0,ReplaceAll:= 1,格式:= 0,Wrap:= 1

我认为EditReplace命令应该在这里可用,但我不知道如何命名它(而不是WordBasic。)

我不是程序员。我是一名翻译,我没有特殊的编程知识。

我也希望获得在该程序中构建宏的所有可用函数和表达式的参考。西班牙版宏编辑器(visual basic)的帮助文件根本没有关于它们的信息。

I have a macro in Word to translate chess notation. When I try to use it in Expression Web 2, the program crashes. It uses sentences like

WordBasic.EditReplace Find:=Str1$, Replace:=Str2$, Direction:=0, MatchCase:=1, WholeWord:=0, PatternMatch:=1, SoundsLike:=0, ReplaceAll:=1, Format:=0, Wrap:=1

I suppose that the EditReplace command should be available here but I don't know how to name it (instead of WordBasic.)

I'm not a programmer. I'm a translator and I don't have special programming knowledge.

I also would like to obtain a reference of all available functions and expressions for building macros in this program. The help file of the Spanish edition of the macro editor (visual basic) has no information at all about them.

推荐答案

打开EW 。
点击工具>宏> Visual Basic编辑器
当编辑器打开时,单击View>对象浏览器。
将显示可用的类,并单击一个将显示子类,事件和功能。

这是因为它有很好的没有适用于EW的SDK。

也就是说,EW具有出色的内置全局查找和替换功能,可用于替换页面中的任何内容,在可见的中网页或页面代码(html)

Open EW.
Click Tools > Macro > Visual Basic editor
When the editor opens click View > Object browser.
The available classes will be displayed and clicking on one
will show the Sub classes, events and functions.

That is about as good as it gets because there is no SDK for EW.

That said, EW has an excellent built in Global find and replace feature
that can be used to replace anything in a page, in either the visible
web page or in the page code ( html )


这篇关于如何为查找和替换创建宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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