By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,380 Members | 3,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,380 IT Pros & Developers. It's quick & easy.

Automated Application using VB

P: 1
Hi,

I am new at Visual Basic. I need to create an application which will open notepad file copy that data and paste in to msword and run macro to find and replace text. All I want to do using Visual Basic and then want to put that exe in to schedule task

Anyone have can help me with this shell programming?

Need VB Code for following

- Open Notepad File
- Copy All data from Notepad file
- Open MSWORD
- Paste data to Msword
- Run Macro via MSWORD having Find and replace function
- Copy all data from word and paste into Notepad
- Save Notepad file
- Close Notepad and MSWORD
Jul 1 '08 #1
Share this Question
Share on Google+
1 Reply


kadghar
Expert 100+
P: 1,295
...
Need VB Code for following

- Open Notepad File
- Copy All data from Notepad file
- Open MSWORD
- Paste data to Msword
- Run Macro via MSWORD having Find and replace function
- Copy all data from word and paste into Notepad
- Save Notepad file
- Close Notepad and MSWORD
Well, you should give it a try by yourself, and then, if you have any particular questions we'll be glad to help you.

BTW, you dont need to open notepad, notepad uses TXT files and you can read them via VB using OPEN/FOR
then save the file in a String, and use the REPLACE function
Use OPEN/FOR once again to save the string as a TXT
this way you dont have to lead with Word, macros or ActiveX

HTH
Jul 1 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.