View Single Post
Old 06-02-2009, 05:01 PM
KC3K7 KC3K7 is offline Windows 7 Office 2007
Join Date: Jun 2009
Posts: 1
KC3K7 is on a distinguished road
Default Create a "report" in MS Word from an Excel file

Hi everyone,

I'm attempting to make a human-readable report from an excel spreadsheet that someone gave to me. The first column is header/title information, and the remaining columns to the right are individual records. Each row is a field of a record. I find this a little unusual, since I'm used to rows representing records and columns representing fields. But is there any way to take the data from one column and transplant it into a word document with the corresponding title information. In essence I'm trying to put together a little report based on this spreadsheet. I'm attempting to use a macro to put this together, but I'm unfamiliar with VSB and this is what I've gotten already from another website:

 Sub OpenWord()
    Dim wdApp As Object
    Dim wdDoc As Object
    Set wdApp = CreateObject("Word.application")
    Set wdDoc = wdApp.Documents.Open _

' put your code here for working with Word
' This is Word VBA code, not Excel code

    wdDoc.Close savechanges:=False
    Set wdDoc = Nothing
    Set wdApp = Nothing
End Sub
I'm trying to make something in this format from the spreadsheet:
Field Title
     Field Value
Field Title
     Field Value
I apologize if the way I've worded anything is confusing. Any help would be very appreciated. Thanks!

Last edited by Bird_FAT; 06-04-2009 at 07:07 AM.
Reply With Quote