Search Replace inside Word and Excel VBA Code Modules

Discuss WordPipe, ExcelPipe and PowerPointPipe. Get help with installation and running, notify us of bugs, request new features and enhancements.

Moderators: DataMystic Support, Moderators

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Search Replace inside Word and Excel VBA Code Modules

Postby DataMystic Support » Wed Apr 22, 2009 10:02 am

WordPipe and ExcelPipe now support search/replace inside Word and Excel VBA Code Modules.

You need to check the Look In location Code Modules.

You can perform a literal (exact) match using the Search Type Normal search.

Or, you can perform a pattern match using Search Type EasyPattern Wildcards or Perl regexWildcards.

As an example, to replace a subroutine called Sub HelloTest() with a new definition,

Using EasyPattern Wildcards (http://www.datamystic.com/easypatterns_reference.html), set the search text to:

Code: Select all

Sub HelloTest()[ 1+ chars ]End Sub
and set the replacement text to the new definition (you can paste a multi-line replacement function from the windows clipboard).

Using Perl regexWildcards, , set the search text to:

Code: Select all

Sub HelloTest\(\).*End Sub
and set the replacement text to the new definition.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

yangkwak
Posts: 1
Joined: Fri Apr 26, 2013 6:06 am

Re: Search Replace inside Word and Excel VBA Code Modules

Postby yangkwak » Fri Apr 26, 2013 6:10 am

Hello,

I couldn't get WordPipe to replace my sample macro.
My sample script is as follow,

Sub TestMacro001()
'
' TestMacro001 Macro
'
'
MsgBox ("hello word! \Desktop App Readiness Test Documents\")

End Sub


"Code Modules" in checked.
And Find What is "\Desktop App Readiness Test Documents\"
Replace With is "\Desktop App Readiness Test Documents\subfolder001\"

I've tried various option but couldn't make it work. Any advice on what I am doing wrong?

Also, does it not work if I select ALL options in "Look in"?

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Search Replace inside Word and Excel VBA Code Modules

Postby DataMystic Support » Sat Apr 27, 2013 7:46 am

Can you send a test document and your WordPipe settings (File\Save As, .wpp file) to our support address?

Also, which version of WordPipe, Windows, and of MS Word is this?
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “WordPipe, ExcelPipe and PowerPointPipe Support”

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests