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:
Code:
Sub OpenWord()
Dim wdApp As Object
Dim wdDoc As Object
Set wdApp = CreateObject("Word.application")
Set wdDoc = wdApp.Documents.Open _
(FileName:="C:\Path\myTestDoc.doc")
' put your code here for working with Word
' This is Word VBA code, not Excel code
wdDoc.Close savechanges:=False
Set wdDoc = Nothing
wdApp.Quit
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
etc.
I apologize if the way I've worded anything is confusing. Any help would be very appreciated. Thanks!