Thread: Using text in MS Word

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    16

    Using text in MS Word

    Hey, thanks for checking this out...
    Alright, what I'm trying to do is write a (hopefully simple, cause I haven't been programming all that long) program that filters through the text of a document as the user types it (program is run in the background until manually closed down) and changes shorthand into more formal text ("ne" = "any", "b/c" = "because"). However, I have a couple of issues... When reading in the file with an ifstream, there is all those extra characters MS Word uses, so it makes it difficult to change just the right characters. Is there a way to read just the text in, without the extra characters without manually copying it to a .txt file and then writing the edited stuff back out to the document? If anyone knows where a good tutorial is on that sort of thing, I would gladly accept that, too. Thank you!
    By the way, I'm using C++...

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Unless you want to spend an age working out the MSWord .doc format (or maybe write a new MSWord!!) then forget ifstreams....

    You may want to look at a keylogger...there are various threads...and I have an example on my site.....but unless you are adept at Windows programming (inc. Dlls, windows hooks, process space...ect) forget it.....

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    16
    Yeah, I pretty much figured that ifstreams were not the way to go, that's why I was looking for a new way, thank you. I will definitely check out your site and check into keylogging, I appreciate it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX | Drawing text
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-08-2009, 12:23 AM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. How to use FTP?
    By maxorator in forum C++ Programming
    Replies: 8
    Last Post: 11-04-2005, 03:17 PM
  4. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  5. MS Word
    By Al_Pennyworth in forum Windows Programming
    Replies: 0
    Last Post: 04-19-2004, 08:18 AM