473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to Save a file in Wordpad using VB?

Hi Friend,

I need to open a "D:sam\a.wif" 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
Aug 21 '08 #1
1 3018
vdraceil
236 100+
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..
Aug 23 '08 #2

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

Similar topics

6
by: sea | last post by:
I have text files in the following format: 123,34, ,345,890, 123,23 .. .. .. As you can see, the problem is that (1) the commas can occur in
2
by: Patrick L. Nolan | last post by:
I'm trying to find a clean way to launch a Wordpad editor on Windows. By "clean", I mean that it should work on as many versions of Windows as possible, and it shouldn't require installing any...
3
by: Maya | last post by:
Hey, there! I'm new to vb.net and it seems I wouldn't be able to solve this without help. I have a pipe delimited file that has to be saved in txt format so it could be accepted by my DTS...
4
by: Aliza Klein | last post by:
I am new to ASP so please pardon me if this is crazy. I have data that I want to allow the user to be able to save in a format that will then enable the user to open the data in Excel. (I have...
7
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. It is greatly appreciated. I would like a command button in VB.Net 2002 to open a text file, then to allow text from a textbox on the current form...
21
by: iwdu15 | last post by:
how can i create a code to make my program create an rtf file? heres what i have so far, any help would be appreciated: Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As...
7
by: D & J G | last post by:
Is there a way to instruct Windows file-handling - 'Opens with:' - from within VB6? I want to ensure that files with the .rtf (rich text) extension always go to Word Pad, no matter which future...
13
by: George | last post by:
Hi, I am re-writing part of my application using C#. This application starts another process which execute a "legacy" program. This legacy program writes to a log file and before it ends, it...
0
by: rupali77 | last post by:
hi i want to open my existing wordpad file on button click in vb.net for eq. if i click on button ABC tht shud allow me to open my ABC.txt file(wordpad) if i click on button XYZ tht shud...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.