|
-
Jul 29th, 2005, 12:08 AM
#1
Thread Starter
New Member
Accessing data from word documents
At present, in order to get data out of a word document i have to open it with word, as in Documents.Open. Having to do this with a number of documents is quite slow. Are there more efficient ways of accessing data from within a document?
I am quite impressed with the performance of ADO with MS Access databases. Not having to open Access to run queries makes life a breeze. I know it's not the same thing but reading data from 200+ documents takes a long time 
Thanks!
-
Jul 29th, 2005, 12:11 AM
#2
Re: Accessing data from word documents
As of yet I have not come across anything like this yet. Een when you do a right click > print, it still opens Word briefly. The fileformat may be the only way to read it without instanciating an instance of Word so I would say to search for something using this logic.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 02:12 AM
#3
Thread Starter
New Member
Re: Accessing data from word documents
Thanks a heap for your speedy reply,
I don't think i have 1/100000th the skills to reverse engineer the doc format , and that IS what you're referring to no? Or have i mis-interpreted?
-
Jul 29th, 2005, 10:09 AM
#4
Re: Accessing data from word documents
Sort of, if you open the file using standard File I/O then you may be able to identify where the data starts.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 31st, 2005, 11:09 AM
#5
Re: Accessing data from word documents
You can open the doc using the WOM and save it as a dos textfile. Then you can use the File I/O to open the textfile and read it. Although, this does use the WOM it may be just as slow but if the docs dont change and you need to get data again, you could read from the textfiles as a shortcut.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 4th, 2005, 12:35 AM
#6
Thread Starter
New Member
Re: Accessing data from word documents
Yeah the documents won't be modified, will this enable me to retain formatting though? I need to retain tables and dot points, otherwise i would store all the clauses as text files
-
Aug 4th, 2005, 12:59 AM
#7
Thread Starter
New Member
Re: Accessing data from word documents
YAY! I just found a much quicker way of doing things.
Selection.InsertFile fileName:=clauseDoc
Thanks for your help! I learnt quite a bit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|