Jon, Its certainly a possibility. I wouldn't recommend it (what if someone adds bookmarks to the documents with the same name as the tags you search for, for example).
And (from memory), Word sometimes stores data that has subsequently been deleted from the document. In short, unless you are using a documented method of accessing an application's data (meaning use Word, or a tool designed to use Word's files, or write your own Word parser based on documentation about the Word file format), I wouldn't suggest it. Seeya Matthew Wills | Senior Analyst Programmer | Adviser Tools and Services| Financial Planning and Third Party | NAB Technology | Wealth Management Australia |---------+----------------------------> | | Jon Rothlander | | | <[EMAIL PROTECTED]| | | .NET> | | | | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM | | cc: | | Subject: Re: [ADVANCED-DOTNET] Does anyone know how to read a Word document in .Net 2003? | >--------------------------------------------------------------------------------------------------------------| I really appreciate all of the discussion on this topic and the many great ideas. I have taken each suggestion and dug into it in depth. Are there any issues if I just do a rename of the word doc from file.doc to file.txt, then open the file as a text document and parse if for the data I need? I know that the Word document format is not in strait ASCII text, but it appears that the data itself is. I've opened the file and there's a lot of garbage here from Word, but the data I need is just sitting there as text. I wrote a simple parser to read the file and remove the extra characters that would cause problems... mainly chr(0), as it seems to be interpreted by the stream reader as an end-of-file character, but reading it like this seems to work file. I'm reading for tags such as firstname:, lastname:, etc. They are all there and I really could care less about all of the Word stuff in the document. I just need the textual data. Does anyone see any problems with this approach? Just read it as a .TXT file and pull out the data. Jon ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
This e-mail is sent by or on behalf of the named sender identified above. If: (a) you do not wish to receive any e-mail marketing material from this person in the future, please forward the contents of this email to [EMAIL PROTECTED] with the word "unsubscribe" in the subject box. (b) you wish to unsubscribe from all central e-mail marketing lists used by our business, please forward the contents of this e-mail to [EMAIL PROTECTED] with the message "unsubscribe from all central e-mail marketing lists" in the subject box. If you do not forward the contents of this e-mail with your unsubscription then it may not be able to be implemented. The information contained in this e-mail communication may be confidential. You should only read, disclose, re-transmit, copy, distribute, act in reliance on or commercialise the information if you are authorised to do so. If you are not the intended recipient of this e-mail communication, please immediately notify us by e-mail to [EMAIL PROTECTED], or reply by e-mail direct to the sender and then destroy any electronic and paper copy of this message. Any views expressed in this e-mail communication are those of the individual sender, except where the sender specifically states them to be the views of a member of the National Australia Bank Group of companies. Any advice contained in this e-mail has been prepared without taking into account your objectives, financial situation or needs. Before acting on any advice in this e-mail, National Australia Bank Limited recommends that you consider whether it is appropriate for your circumstances. If this e-mail contains reference to any financial products, the National recommends you consider the Product Disclosure Statement (PDS) or other disclosure document before making any decisions regarding any products. The National Australia Bank Group of companies does not represent, warrant or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus or interference. =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com