WordPad Automation

D

Ding

Does anybody have sample VBA code to open a file with Wordpad and execute a
"Search & Replace"?

Thank you!
 
D

Dale Fye

Why do you feel you need to use NotePad?

If it is a text file, you can open it with Access read it into a textbox,
then use the Replace function to make automatic replacements, or use the
instr( ) function to find the next occurance of the string and highlight it.

Then, when you are done, you can write it back to the text file.

Take a look at the Open, Input, Print, and Write functions and statement in
Help to get some ideas on how to do this.
 
D

david

There is no automation for WordPad: you would have to use Send Keys to
send keystrokes to WordPad to do "Search & Replace".

WordPad is a shell for the RichText object and the Text Services Framework.

The RichText object can be controlled and automated: that is how WordPad
works. You can insert a RichText object on to one of your forms if you want
to do that.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top