Reply
 
Thread Tools Display Modes
  #1   Report Post  
stephan82
 
Posts: n/a
Default 2 entries from DB in one document


I am trying to create envelopes with sender and recipient. The
information for both is in the same DB and the same table.

Is there a way to get to different records in one document?

Maybe some Macro/VBA?


--
stephan82
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Depending on exactly what you are trying to do, you may be able to...
a. organise that your data source is a query or view that does the
necessary SQL Join to bring both address fields into the result. That's if
you're mailmerging.
b. use one of more DATABASE fields in your document to get the different
records you need. In essence you use Tools|Customize to enable the database
toolbar, then use the Insert Database button to get the data, inserting it
as a field. If you only have one column and do not specify table headers,
you just get the field without a surrounding table. But you would probably
also have to modify the SQL to get all the parts of the address in a single
field.
c. use VBA and e.g. ADO to access your database and either stuff the data
directly into your document, or perhaps to set up the value of a Word
document variable that you insert via a { DOCVARIABLE } field.

In every case you really need to know how the records are related.

I doubt if that answers your question but if you need more info it would be
useful to have a bit more detail about whether you are merging or not, which
version of Word, and how you tell which specifc records the data needs to
come from.

Peter Jamieson
"stephan82" wrote in message
.. .

I am trying to create envelopes with sender and recipient. The
information for both is in the same DB and the same table.

Is there a way to get to different records in one document?

Maybe some Macro/VBA?


--
stephan82



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you save individual document pages as seperate word files? John Calligy Mailmerge 2 April 12th 05 09:14 AM
See the document map when the document is split in two panes. Pedro MarĂ­n Fernandes Microsoft Word Help 4 March 23rd 05 06:39 PM
Remembering initial caps set in a document markymids New Users 9 March 20th 05 11:49 PM
Newbie document question please Dudley Henriques New Users 4 January 9th 05 08:38 PM
Word 2000 - Document 1 and Document 2 always open on startup VM Microsoft Word Help 2 January 4th 05 11:54 PM


All times are GMT +1. The time now is 01:04 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"