473,394 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Sending Output to a Word or Excel Doc/Spreadsheet

I have a simple app that logs details of my customers and the work done for
them. It uses a few tables in Access and allows me to keep a basic record of
things for my accountant.

How can I output the billing info from my app to the Word doc or maybe Excel
spreadsheet? I can gather all the info I need from a query but I have
trouble sticking into a word document so the info is placed in the correct
places in it. ie: name, address, billing info, amounts, etc.

I can create an instance of work in VB.Net but beyond that I'm lost. Could
somebody point me in the right direction for what must be a much used piece
of coding, or just provide any old advice??

Derek
Nov 20 '05 #1
1 1935
Hey.

The easiest way to do this (assuming that you are using
standard word documents, etc.) is to edit the standard
documents so that the places where you would like to add
this data into are Text Fields. Then, for the properties
of the textfields, change the name to something you'll
remember (ie. txtName, txtAddr1, etc.). Then, add these
standard documents to the project as embedded resources.

In runtime, you'll want to extract these standard docs to
temp folders, and then load the docs into Word. Then,
you'll just cycle through all of the Document.FormFields
and find the one with the correct name (ie. txtName,
etc.) and set that FormField.Result to the string
representation of whatever that Field's data should be.

To do this, I'm assuming that you have an understanding
of the Word object model, and know how to extract
embedded resources. If you have any further questions,
or aren't too sure how to go about doing what I said
above, don't hesitate to shoot me an email and ask.

Good luck!
Ben

-----Original Message-----
I have a simple app that logs details of my customers and the work done forthem. It uses a few tables in Access and allows me to keep a basic record ofthings for my accountant.

How can I output the billing info from my app to the Word doc or maybe Excelspreadsheet? I can gather all the info I need from a query but I havetrouble sticking into a word document so the info is placed in the correctplaces in it. ie: name, address, billing info, amounts, etc.
I can create an instance of work in VB.Net but beyond that I'm lost. Couldsomebody point me in the right direction for what must be a much used pieceof coding, or just provide any old advice??

Derek
.

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cpeters5 | last post by:
Deaa group, I am using SQLServer 2000 in an XP Sp2. I would like to do the following: I have a program running on a database server that generates some data which are loaded to the database....
3
by: Bob | last post by:
What I want to do is write a program that reads through a Word Document, finds certain words or sentences I want, and then paste into an Excel spreadsheet. I dont know much about C#. But I...
3
by: mphanke | last post by:
Hi, I'm writting an application based on an SQL Server for Order Management. I have some data I want to export to Excel and Word, maybe some day I will implement a serial letter. The problem...
2
by: Trond Hindenes | last post by:
Hello all, I am working on a application for analyzing data from a SQL Server Database using vb.net. THe application will mostly be web-based, although we migt use some Windows Forms for some of...
4
by: __Stephen | last post by:
Sorry about the cross-post. "Life would be so much easier it we didn't have end users" :) I have an ASP.NET app that delivers a cross tab report to our Accounting Department. CFO just demanded...
6
by: Mark Rae | last post by:
Hi, My client has asked me to provide a "quick and dirty" way to export the contents of a DataGrid to both Excel for analysis and Word for editing and printing, so I'm investigating client-side...
1
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
3
by: Paul | last post by:
I use OpenOffice but I suppose similar formatting rules apply to MS Excel. For example, to format a cell for two digit numbering, the format code is: #,##0.00 I can use formulas (=F$temp + 5)...
1
by: richie9648 | last post by:
Hi All Been attempting my spreadsheet conversion to notepad all morning without any luck and now very frustrated Could some of you good people in here help out if possible It seems very...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.