Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Multiple Document Merge.

This is a discussion on Multiple Document Merge. within the Microsoft Word forums, part of the Courses category; Hi Guys.. hope u all are well... Sometime we have thousands of Ms Word documents having lot of pages, all ...

  1. #1
    *I am Banned*
    Join Date
    Apr 2010
    Location
    lahore
    Age
    47
    Posts
    293

    Angry Multiple Document Merge.

    Hi Guys..

    hope u all are well...

    Sometime we have thousands of Ms Word documents having lot of pages, all are in one Folder / Directory and we need to merge them all in one single document, wonder how...........is that Magic let's start this little trick.

    Open Ms Word and press Alt + F11 to invoke VBA editor, double click on this document, and paste the below code.

    Sub MergeDocs()
    Dim rng As Range
    Dim MainDoc As Document
    Dim strFile As String
    Const strFolder = "C:\My Word Documents\" 'change to the folder path
    Set MainDoc = Documents.Add
    strFile = Dir$(strFolder & "*.doc") ' can change to .docx
    Do Until strFile = ""
    Set rng = MainDoc.Range
    rng.Collapse wdCollapseEnd
    rng.InsertFile strFolder & strFile
    strFile = Dir$()
    Loop
    End Sub


    close the VBA editor save the file as Magic or whatever you wana name it.

    now place this file inside the folder / directory where your all documents are located.

    open magic file and press Alt + F8 to run the macro select MergeDocs and click on Run button.

    now it will merge all the documents into one.........wow......
    if you like this then write few lines ...........or atleast say thanks..

  2. #2
    /\/\oderator
    Join Date
    Aug 2010
    Location
    karachi
    Age
    35
    Posts
    354

    Re: Multiple Document Merge.

    ohhho very niceeeeeeeee This is visual basic block
    Cheapest Web Designing Service for personal/educational/companies at very Cheap Price just
    visit: www.Solution 4U.1free.Ws Voice: 0321-3809083
    delete space

  3. #3
    Student
    Join Date
    Jul 2010
    Location
    pakistan
    Posts
    2,045

    Re: Multiple Document Merge.

    its a very nice sharing.

  4. #4
    Student
    Join Date
    Jul 2010
    Location
    pakistan
    Posts
    2,045

    Re: Multiple Document Merge.

    its a wonderful sharing.

  5. #5
    iTT Captain Rahi's Avatar
    Join Date
    Feb 2009
    Location
    Karachi
    Age
    65
    Posts
    1,198

    Re: Multiple Document Merge.

    ڈئیر عظیم اگر آپ اردو میں شیئرنگ کرتے تو اچھا تھا


  6. #6
    gul
    gul is offline
    Senior Student gul's Avatar
    Join Date
    Apr 2008
    Age
    72
    Posts
    221

    Re: Multiple Document Merge.

    nice janab...
    Hijab

  7. #7
    iTT Student tracemultani's Avatar
    Join Date
    Jul 2010
    Location
    Multan
    Posts
    56

    Re: Multiple Document Merge.

    Quote Originally Posted by azeeem_786 View Post
    Hi Guys..

    hope u all are well...

    Sometime we have thousands of Ms Word documents having lot of pages, all are in one Folder / Directory and we need to merge them all in one single document, wonder how...........is that Magic let's start this little trick.

    Open Ms Word and press Alt + F11 to invoke VBA editor, double click on this document, and paste the below code.

    Sub MergeDocs()
    Dim rng As Range
    Dim MainDoc As Document
    Dim strFile As String
    Const strFolder = "C:\My Word Documents\" 'change to the folder path
    Set MainDoc = Documents.Add
    strFile = Dir$(strFolder & "*.doc") ' can change to .docx
    Do Until strFile = ""
    Set rng = MainDoc.Range
    rng.Collapse wdCollapseEnd
    rng.InsertFile strFolder & strFile
    strFile = Dir$()
    Loop
    End Sub


    close the VBA editor save the file as Magic or whatever you wana name it.

    now place this file inside the folder / directory where your all documents are located.

    open magic file and press Alt + F8 to run the macro select MergeDocs and click on Run button.

    now it will merge all the documents into one.........wow......
    if you like this then write few lines ...........or atleast say thanks..


    Thanks

    but let me know that i am trying to work on te above mentioned code in MS OFFICE 2000 with XP Windows but it does not work help >>>>>>>>>>>>>>>>>
    Last edited by tracemultani; 27th October 2010 at 01:58 PM.

  8. #8
    Student
    Join Date
    Jul 2010
    Location
    pakistan
    Posts
    2,045

    Re: Multiple Document Merge.

    nice sharing
    keep sharing please
    i like this

  9. #9
    *I am Banned*
    Join Date
    Apr 2010
    Location
    lahore
    Age
    47
    Posts
    293

    Re: Multiple Document Merge.

    What exactly u r facing? can u explain little more..
    if possible paste ur code or the way u r doin..

  10. #10
    iTT Student tracemultani's Avatar
    Join Date
    Jul 2010
    Location
    Multan
    Posts
    56

    Re: Multiple Document Merge.

    Quote Originally Posted by naeem01 View Post
    nice sharing
    keep sharing please
    i like this
    dear i m facing some problems regarding these codes of vb


    would u like to help me

  11. #11
    *I am Banned*
    Join Date
    Apr 2010
    Location
    lahore
    Age
    47
    Posts
    293

    Re: Multiple Document Merge.

    Sure y not...
    but plz explain what exactly you r facing.

  12. #12
    Senior Student jia'j's Avatar
    Join Date
    Dec 2010
    Location
    Karachi,Pakistan
    Posts
    112

    Re: Multiple Document Merge.

    Thanks 4 this information.please this post can u translate into urdu?

  13. #13
    *I am Banned*
    Join Date
    Apr 2010
    Location
    lahore
    Age
    47
    Posts
    293

    Re: Multiple Document Merge.

    Sure but hereafter.....Don't know much about urdu...if i am going to type it, there is a lot of chance of errors and it takes too much time as i am not use too..............Sorry for that wish somebody can do that for u.

  14. #14
    iTT Student
    Join Date
    Dec 2010
    Location
    Bosnia
    Posts
    29

    Re: Multiple Document Merge.

    very useful

    thanks

  15. #15
    iTT Student
    Join Date
    Dec 2010
    Location
    Lahore
    Posts
    14

    Arrow Re: Multiple Document Merge.

    Quote Originally Posted by azeeem_786 View Post
    Hi Guys..

    hope u all are well...

    Sometime we have thousands of Ms Word documents having lot of pages, all are in one Folder / Directory and we need to merge them all in one single document, wonder how...........is that Magic let's start this little trick.

    Open Ms Word and press Alt + F11 to invoke VBA editor, double click on this document, and paste the below code.

    Sub MergeDocs()
    Dim rng As Range
    Dim MainDoc As Document
    Dim strFile As String
    Const strFolder = "C:\My Word Documents\" 'change to the folder path
    Set MainDoc = Documents.Add
    strFile = Dir$(strFolder & "*.doc") ' can change to .docx
    Do Until strFile = ""
    Set rng = MainDoc.Range
    rng.Collapse wdCollapseEnd
    rng.InsertFile strFolder & strFile
    strFile = Dir$()
    Loop
    End Sub


    close the VBA editor save the file as Magic or whatever you wana name it.

    now place this file inside the folder / directory where your all documents are located.

    open magic file and press Alt + F8 to run the macro select MergeDocs and click on Run button.

    now it will merge all the documents into one.........wow......
    if you like this then write few lines ...........or atleast say thanks..
    I CAN'T UNDERSTAND YOUR SHARING PLZZZ TELL ME IN DETAILS PLZZZZZZ
    ON MY INDIVIDUALLY
    AT
    mazhar-iqbal@live.com
    MAZHAR IQBAL


    every thing is possible in the world

  16. #16
    *I am Banned*
    Join Date
    Sep 2009
    Location
    Sialkot
    Age
    34
    Posts
    291

    Re: Multiple Document Merge.

    for all who are facing problem

    to use VBA u must have installed it first...

  17. #17
    iTT Student
    Join Date
    Feb 2010
    Location
    pakistan
    Posts
    22

    Re: Multiple Document Merge.

    nice sharing

  18. #18
    iTT Student
    Join Date
    Apr 2010
    Location
    karachi pakistan
    Posts
    33

    Re: Multiple Document Merge.

    nice sharing

  19. #19
    <> The Pakistani <> arifraza's Avatar
    Join Date
    Dec 2008
    Location
    ALLAH ki Zameem per
    Posts
    185

    Re: Multiple Document Merge.

    good Sharing dear

  20. #20
    iTT Student
    Join Date
    Oct 2011
    Location
    pakistan
    Posts
    10

    Re: Multiple Document Merge.

    good, plz tell in detail

Page 1 of 2 12 LastLast

Similar Threads

  1. *~* Important Document *~*
    By baibo in forum Zaarori Maloomat
    Replies: 2
    Last Post: 3rd April 2011, 09:22 AM

Tags for this Thread

Posting Permissions

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