How to Save a file in Wordpad using VB?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinoth124
    New Member
    • Aug 2008
    • 1

    How to Save a file in Wordpad using VB?

    Hi Friend,

    I need to open a "D:sam\a.wi f" file in the wordpad then I need to save the same file immediately with out any updation and then I need to close it.

    For opening a file I used this command:
    Shell "C:\Program Files\Windows NT\Accessories\ wordpad.exe D:sam\a.wif"

    Will you please help me to save the a.wif file once the above command executed.

    Thanks in advance


    Thanks,
    Vinoth
  • vdraceil
    New Member
    • Jul 2007
    • 236

    #2
    Hi vinoth,
    (my name is vinoth too!!)

    Why do you want to save the file again if you are not modifying it?

    try sendkeys function(API) or keybd_event function(API) to virtually press and hold "Ctrl" and press "S"-these keystrokes will be sent to the active wordpad window

    i would prefer the second function..

    Comment

    Working...