Results 1 to 3 of 3

Thread: Copy of *.doc

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    21

    Question

    I'd like to kwon how to programm (in VBA) to open two Word documents and to copy their text into a third one. It doesn't seem that hard to do but... I have some difficulties.

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    Well, you would do something similar to this.

    Code:
    Sub Combine()
    Set NewDoc = Word.Documents.Add
    NewDoc.Content = Doc1.Content & Doc2.Content
    Set NewDoc = Nothing
    End Sub
    Where Doc1 is your first document and Doc2 is your second.
    www.RealisticGraphics.net

    Running VS.Net Enterprise & VB 6

    Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML

    MSN Messenger: kmsheff

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    21

    Smile

    Thank U. It helps me quit a lot !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width