Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 13th, 2006, 07:19 AM
Authorized User
Join Date: Feb 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to copy date from doc files

i have this coding for reading data from word file( i have to read atleast 1000 doc files).i put a while loop for reading all these files.
but i have a problem is that when i open another word file it disturbs the already open file. through loop.
 i want a solution which reads all the files and whenever somebody open any other word file it opens in new word document.

  Dim File As Object = FileName
        Dim NullObj As Object = System.Reflection.Missing.Value
        Dim Doc As Word.Document = WordApp.Documents.Open(File, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj, NullObj)
            Dim Data As IDataObject = Clipboard.GetDataObject()
            Dim Text As String = Data.GetData(DataFormats.Text, True).ToString()
            Data = Nothing
            Return Text.Replace("'", "''")
        Catch ex As Exception
            Return "Error:"
            File = Nothing
            Doc.Close(NullObj, NullObj, NullObj)
            NullObj = Nothing
        End Try

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text from 1 doc to other doc thru vba in word itchock Word VBA 2 December 29th, 2006 02:47 AM
Copy contents of Word doc & Paste in Excel - How?? robear Javascript How-To 1 August 23rd, 2006 03:22 PM
How to Copy contents of Word doc & Paste in Excel robear Pro PHP 0 August 21st, 2006 12:25 PM
copy date values between date controls Alcapone Javascript How-To 1 April 13th, 2006 03:13 AM
How to search whole disk for .doc files? bcmaverik VB.NET 2002/2003 Basics 2 February 18th, 2004 09:25 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.