#1
|
|||
|
|||
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: 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. Last edited by Bird_FAT; 06-04-2009 at 07:07 AM. |
#2
|
||||
|
||||
Not quite sure where you are trying to go here!?! Any chance you could upload the two documents with annotations as to what you want to happen to what! (Please remember to remove all personal data!)
And, is this something that you want to run from a template automatically when you open it? Is it going to be saved and then sent on to someone else? Do you want it to update every time it's opened? Hoping to be able to help (this sounds interesting!). |
Tags |
excel, maco, vsb, wor |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wierd symbols inplace of "space", "indentation" etc | aka.bhagvanji | Word | 5 | 02-16-2012 11:50 AM |
"This File ____.doc/.docx/ppt/pptx cannot be opened"!! help pls. | Chrisy | Office | 1 | 02-13-2012 05:11 PM |
create a hotkey for "add sender to blocked senders list" | mytoyo | Outlook | 0 | 03-29-2009 09:39 AM |
Appearance of "Open" file menu | quietmonkey | Word | 0 | 01-26-2009 07:57 AM |
Forwarding a PDF file from the "sent items" folder | jesper | Outlook | 0 | 09-20-2007 10:56 AM |