Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Automated Application using VB

Question posted by: sneh4ever (Newbie) on July 1st, 2008 07:51 PM
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
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
kadghar's Avatar
kadghar
Expert
1,057 Posts
July 1st, 2008
11:31 PM
#2

Re: Automated Application using VB
Quote:
Originally Posted by sneh4ever
...
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

Reply
Reply
Not the answer you were looking for? Post your question . . .
180,792 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Visual Basic Forum Contributors