Automated Application using VB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sneh4ever
    New Member
    • Jul 2008
    • 1

    Automated Application using VB

    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
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    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

    Comment

    Working...