o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Open a word doc with Wordpad and Save as a text file{Resolved} -

Hello

I have a Ton of Word docs that I need to open in Wordpad and then save as a .txt file. I have an app that parses the txt file and loads that data into a DB. If I open .doc file with word and save it as a .txt file it crashes the parser. If I do it with Wordpad it works fine.

I'm looking for a way to automate the process with VB. But, I'm having no luck trying to get wordpad to work with VB.

I've tried to shell wordpad with:
Code:
Shell "wordpad", vbNormalFocus
This gives me an error code 53 File not found.

And with:
Code:
Shell "C:\Program Files\Windows NT\Accessories\wordpad.exe", vbNormalFocus
This opens up a blank wordpad doc, But I can't find a way to programatically open the doc file and do the save.

and with:
Code:
Shell "C:\Program Files\Windows NT\Accessories\wordpad.exe " & App.Path & "\Worddoc.doc", vbNormalFocus
This one opens wordpad but then wordpad gives the error:
"C:\Program
Connot find this file
Pease verify that the correct path and file name are given."

The path is correct to the doc file.

Any Ideas?

Can Wordpad even be manipulated via code?

Thanks

David

 

Problem with running wordpad from inside of visual basic program -
Hello I have to do such kind of application from inside of vb code; - open an text file which is not recorded in sqeuantial format with wordpad program - replace certain text with a new value - Than save this file's content with using wordpads save facility. I have to use wordpa


Open a word doc with Wordpad and Save as a text file{Resolved} -
Hello I have a Ton of Word docs that I need to open in Wordpad and then save as a .txt file. I have an app that parses the txt file and loads that data into a DB. If I open .doc file with word and save it as a .txt file it crashes the parser. If I do it with Wordpad it works fine.


How to Save a file in Wordpad using VB -
Hi Friend, I need to open a "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&


Using Wordpad with VB Saved Text Files -
I have a program in which I save TXT files using Write (VB 3.0). I then have users connect to Wordpad to avoid a lot of printer issues via a selection in my program which auto opens the file. My problem is twofold. Wordpad doesn't save page attributes for formatting such as margin


How can I open a Word Document in Word Pad using VB/VBA -
Hi all, I need to open my Word document in Wordpad (which comes with Windows operating system for some specific purposes) and save it as Word 6.0 document / Rtf format. So, How can i do that? Pls help me. Thanks, CS.


Open-Save rich text files -
Hi, I need a code to open a wordpad or word file in a rich text box and also saving from rich text box to file. Thanx


Saving txt file in ms-dos format -
Hey Im writing some data into a txt file, but i need it to save in Ms-Dos format, and not in the standard format that windows 2k use. I need to do this cuz i have some special signs in danish language, that aint allowed in the txt file. I tryed to do it by opening Wordpad and


matches whole word only -
i open a text file, i want to find a particular word, which matches whole word only, like in a wordpad application. how to do it. thnx in advance -- BSK --


WordPad limitations -
Does anyone know if WordPad can only display a certain amount of info? I've got a huge dat file that I need to seperate into smaller dat files in order for this preprocessor to be able to parse them without crashing, so I opened up this 139 mb dat file in word pad, copied and pasted s


java acting up when switching from notepad to wordpad{resolved} -
I usually use notepad to construct programs. Lately I tried to do one in wordpad and it shows up a bunch of errors. I cannot even compile working source code off the internet that was done in wordpad. I tried a simple hello world program in wordpad and it would not compile. It's do


How can I let my app know that an external program has ended ** -
Ok, this is what I want to do:[list=1][*]Have a bunch of files on disk and have the user select which file they want to view in a RichTextbox.[*]Have the user choose a menu item and be able to launch WordPad and automatically load the displayed text from the RichTextBox into WordPad re


WordPad and VB -
How do i get/set the text of a wordpad window i opened through OLE? I want to open it and put some text in it... when its closed i want it to send the (changed) RTF-text back to my app, so that i cant save it in an other format (I do not want to use the RTF-Control)


Open TXT file in WORDPAD -
hi friends, As we know whenever we open a .TXT file by double-click, it opens in NOTEPAD, as we have already asked our operating system to do so, now I want to develop a small program, which will make changes in my windows systems, where by if I open a TXT file, it should get open in


Word document inside IE !!!!!! -
How do we get the word functionalities when I open a word document through an IE?? I am able to view all the menus and work with the file same way as a standalone word document. Is it possible to get anyother application like Notepad or wordpad documents inside IE like word??


How to Open Word & PDF File in VB.Net -
I save File Path of either the Word or PDF file in sqlserver, then I want to open that... steps. 1. I dentify if what kind of file is that (Word or Pdf) 2. Open an appropriate application to open the file (Microsoft Word / Acrobat Reader) how can I do this in


Using DTPicker -
I'm trying to create a program that with the change of the date, a new text field or wordpad document opens so that i can enter and save new text for that date. I'm currently using DTPicker, and ole with a wordpad document. But so far I've been unsuccesfull. Will this work?


Creating a Word document -
I need to create a word document without just populating a bookmarked existing template file - I need to create one from scratch. 2 ways I was thinking. One is to open Word, and somehow send strings and formating into to a word object. If you can give me a link on how to do this, great


General Windows "Print to File" with VB Code - Resolved -
Hi, this is not really a coding question, but, whenever I try to print my code to "file" so that i can forward it, it always prints in an unrecognised format. Wordpad, Word or Notepad cannot read it!! It is just simply selecting file---print and selecting print to file.


Save and Save As... [resolved] -
I've done a search of the forums and haven't been able to find my answer. I'm using standard common dialog box code to do a save (simple textbox into a text file). But how does Save and Save As work? ie Save As will always open the dialog box - but clicking Save should just save


Opening Word Documents - RESOLVED -
I have a number of links to Word documents on my Intranet but when I try to open these word documents from the links in my ASP page, they open in word but do not allow me to select any toolbars so that I can print or save the document. Is there a way that I can force my hyperlink to


Sending text file dot matrix printer directly from vb. -
Please can any one help me in this. I want a text file to be printed directly in dot matrix printer using vb code. This is mainly because I do not want to use any fonts and form feeds and control charcters etc., in text file. Right now I am using note pad to print but when the


Windows WordPad -
Question: Can WordPad be used for object programming from VB like Word or Excel ?


saving word doc in db -
I want to save a ms word document(s) to a database and then display the file names in a combo box or something... but the most important thing is, I need to be able to select the file from the list and it will open in the document in ms word... I have an idea of how to save the file


Calendar program -
I need someon to write a program for me, I don't have the time to do it myself because I haven't used visual basic in about 3 to 4 months. The program will reside in the system tray and should run on start up(be hidden as well). To launch it I need a menu that pops up when you righ


Menu Editor / making own wordpad -
I created a menu thru the editor with File > New, Open, Close, Save, Save As and Exit under File. What I want to do is if it is in intial state then only have the New, Open, Close and Exit enabled. Also, If I click Open or New and a file has been opened, then the Open and New ar


word and visual basic [ How can I open the Save as window of word through vb ] -
Hi, I made a small program with Visual basic that fills a word file with some specific data i used the following to make the connection to word Dim oWord as new Word.Application Dim oDoc as new Word.Document Now I want through visual basic to open the saveAs window of word so


Word application: How could I control the close button -
Hi everyone, my VB6 application have to control completely a word application. The word document have to be opened, saved and closed from it. I succeded to hide standard toolbar and the commands 'New', 'Save', 'Save as', 'Open' and 'Exit' of the 'File menu'. Now i would hi


using wordpad -
With This code ShellExecute 0, "Open", sFileName, 0, 0, 3 i can open a file using notepad, but if i want to use wordpad? Can anyone help, pls?


Page breaks in Wordpad or Notepad -
Does anyone know how to insert a page break in a text file so that either Wordpad or Notepad will recognize it? I have a program that creates a report file, and this file may sometimes contain more than one page. Adding a form feed character - Chr$(12) doesn't seem to work. It shows


Convert Word Doc to Text -
I am trying to crete a script that will read a line from a MS Word document which the script uses in an if statment. Using the scipting.filesystemsobject I can do this but it is reading formated text so I get a bunch of characters returned instead of words. I was wondering if there w


Location of WordPad -
Is there somewhere that tells you the location of WordPad on your users harddrive? I want to load my log files into WordPad without having to change the person's file association.


open ms word doc -
I have done this before, but i cant remember how. I want to open a ms word doc through my program that I created with VB6. The user is able to save a word doc under any name. So when the user clicks open I wanted it to open a explorer window so that the user can locate their file to op


Run Wordpad from a VB app -
Hi all, I have a small Vb application and I want to open Wordpad and transfer the text of a text box when you double click on it. Can anybody please help? Thanks a lot, Chris


Default program for apps -
Is it possible to find what the default application is for a particular program and then run it with VB? For instance is it possible to find out what the default program would be for manipulating DOC files (like if the user has StarOffice or uses wordpad, etc) and then find where th


Binary wordpad == URGENT -
Guys, I am not sure whether this question exactly belongs to this forum, but I would very much appreciate it if anyone can answer the question. I have a program that writes its output as a binary file. I opened the file in wordpad. I was not able to read anything. Then I saved t


wordpad in every win version -
I think wordpad came with every version of windows Yes? Did every wordpad open .rtf files?


RESOLVED To know when excel is done saving -
Hail, I am currently experiencing a problem and it seems to be related to excel being in "save mode". Basically, the application saves an excel file to a server and then saves a text file to the same server. In the meantime, a process from an outside application runs ever


variable reading within txt files {RESOLVED} -
I've searched the forums a bit and haven't found an exact answer to my problem. I have a text file that has lots of values in it, not all of them are setup the same. Usually there will be a line that says the valuename and then the value in quotes. What I'm trying to do is just read


Word saving a text file -
I am using VB to save a RTF as a text file. The problem is that I loose the formating. We used to have a unix based word perfect program that could take a formated file and save it as a text file, inserting spaces and tabs were they were needed. Can Word preserve the layout when savin


How to update this config file for another program -
Hey.. I am stumped.. When I even try to open this file, save (no changes made mind you), then try to open the other program again.. it errors out because the file becomes corrupt.. //edit// I have tracked my vb.net program's problem back to this.. so now I am opening/saving/clo