Solved

Merging Portions of Word Documents

Posted on 2011-03-05
3
346 Views
Last Modified: 2012-06-21
Currently I recieve status reports in MS Word format from multiple techs which I then manually combine into one status report (by copying and pasting) which I send to my supervisor. I would like to automate the process of combining these status reports.  It's a pain.  

Attached is an example of the form I would use to combine all of the individual tech status report.  For the example I've put 2 items for each tech in each category but the number of items could be more or less than 2.  Of course in each of the tech's status report only their name would be on the form (not the other techs).

What would be be best way of combining these status reports and can someone help show me how?  I don't want to pay any licensing fees.  Am open to all suggestions.  Maybe a vb.net or vbs solution?    STATUS-REPORT-TEMPLATE-EE.DOC
0
Comment
Question by:BigBobBK
3 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
Comment Utility
You may try to design your form in Excel or even better by Access. These two applications are appropriate if you collect data and combine them for reporting.

If you choose Excel, you can design a Sumary spreadsheet by which its data are linked from the spreasheet of each Technician. And with Access, you can distribute a Front End to each technician and whatever data they entered could be easily summarized.

I agree that these approaches could not be easily done but once completed and implemented, it will save you time and hassle.

Sincerely,
Ed
0
 
LVL 16

Expert Comment

by:sjklein42
Comment Utility
This is some VB I use to build a document automatically.

You start with a DOC file containing your header boilerplate (headerDocument.doc).

The VB code then opens other files, copies and pastes them into the main document.

At the end, it saves it as a new document called finalReport.doc.

If you know VB you can get the idea pretty easily, I think.

Private Function PasteNow()
    Selection.WholeStory
    Selection.Copy
    Windows(1).Activate
    Selection.Paste
End Function

Private Function PasteInto(whichWindow)
    Windows(whichWindow).Activate
    Selection.WholeStory
    Selection.Copy
    Windows(1).Activate
    Selection.EndKey Unit:=wdStory
    Selection.Paste
End Function

Private Function InsertSectionBreak()
    Selection.EndKey Unit:=wdStory
    Selection.InsertBreak Type:=wdSectionBreakNextPage
End Function

Private Function PasteFile(whichFile)
    InsertSectionBreak
    
    Documents.Open FileName:=whichFile, ConfirmConversions:=False, _
        ReadOnly:=True, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto
    PasteNow
End Function

Sub PasteFilesTogether()
    Documents.Open FileName:="c:\myworkdir\headerDocument.doc", ConfirmConversions:=False, ReadOnly _
        :=True, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate _
        :="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="" _
        , Format:=wdOpenFormatAuto

    PasteFile("c:\myworkdir\inputFile_1.doc")
    PasteFile("c:\myworkdir\inputFile_2.doc")
    PasteFile("c:\myworkdir\inputFile_3.doc")
    PasteFile("c:\myworkdir\inputFile_4.doc")
    
    ActiveDocument.SaveAs FileName:="c:\myworkdir\finalReport.doc", FileFormat:= _
        wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _
        False, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
        False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
        SaveAsAOCELetter:=False

End Sub

Open in new window

0
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
Comment Utility
How about using a master document scheme where the master document includes references to the sub documents.  Although you see the content from the sub documents, the master document is much smaller.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgradā€¦
In a previously published article (http://www.experts-exchange.com/articles/10331/Automatic-Duplex-Scanning-in-PaperPort-Versions-11-12-14.html) here at Experts Exchange, I explained how to achieve duplex (double-sided) scanning in Nuance's PaperPorā€¦
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now