用于删除Word自动更正条目的vb.net代码 [英] vb.net code to delete Word AutoCorrect entries

查看:92
本文介绍了用于删除Word自动更正条目的vb.net代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在Word启动时使用VBA代码来删除某些Word AutoCorrrect条目。代码存储在Word全局模板中,并在Word启动时运行。

I currently have working VBA code on Word startup to delete certain Word AutoCorrrect entries. The code is stored in a Word global template and runs on Word startup.

                            '' setup Word environment as no GPOs exist
                            '' remove AutoCorrect entries
                            '' Dont require a Word doc open to check/set AutoCorrect entries
                            Dim acEntry As AutoCorrectEntry
                            Dim intResponse As Integer
                            Dim ArrCount As Long
                            Dim thisEntry As String
                            Dim strEntry(3) As String
                            strEntry(0) = "acn"
                            strEntry(1) = "(c)"
                            strEntry(2) = "(e)"
                            strEntry(3) = "(r)"

                            For ArrCount = 0 To 3
                                thisEntry = strEntry(ArrCount)
                                For Each acEntry In AutoCorrect.Entries
                                    If LCase(acEntry.name) = LCase(thisEntry) Then
                                        acEntry.Delete()
                                        Exit For
                                    End If
                                Next acEntry
                            Next ArrCount

我需要将Word启动模板中的代码移动到Word COM加载项解决方案中。

I need to move the code from the Word startup template into the Word COM Add-ins solution.

I发现了这篇文章  

I found this article  

https://channel9.msdn.com/coding4fun/articles/When-AutoCorrect-Goes-Bad

https://channel9.msdn.com/coding4fun/articles/When-AutoCorrect-Goes-Bad




我想知道是否有人有样本vb.net代码来删除Word自动更正条目

I was wondering if anyone has sample vb.net code to delete Word AutoCorrect entries

TIA

推荐答案

你好dd _,

Hi dd_,

由于这个论坛正在讨论和询问有关Visual Basic编程语言,IDE,库,示例和工具的问题(不适用于VB6问题)。而且你的问题与VBA的关系更为相关
。关于vba的这个链接,请参考:

Since this forum is discussing and asking questions about the Visual Basic programming language, IDE, libraries, samples, and tools (Not for VB6 questions). And your issue is more related to VBA. This link about vba, please refer that:

https://social.msdn.microsoft.com/Forums / en-US / home?forum = isvvba

感谢您参与论坛活动。

最好的问候,

Cherry


这篇关于用于删除Word自动更正条目的vb.net代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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