PC Review


Reply
Thread Tools Rate Thread

How to do a form letter

 
 
njem
Guest
Posts: n/a
 
      23rd May 2007
I've worked with Access in years past and just getting up to speed on
2007. I've been reading reams of help files and trying various ways
for hours to make a simple form. I need to pull up a person in the db,
click a button and print one of a list of form letters (reports) to
that person. I've tried creating a letter in Word and embedding it.
Even when I set it "to fit" it is reduced in size. If I stretch it it
looks funny. Regardless I then need to overlay field boxes everywhere
they're needed and try to get them to align with the letter. This also
means fields can't have any following text on that line because the
letter text isn't going to adapt to the field length.

I'm sure I could create a macro to export the selected data to a text
file that Word could use as a merge source, but there are about 100
different letters. So the operator would need to run the export macro,
switch to Word, open the correct letter, merge, then back to Access.
Not very workable to do many times a day in rapid succession.

I really hope I'm missing some easy way to do this. Any suggestions?

Thanks,
Tom

Originally posted in "forms".

 
Reply With Quote
 
 
 
 
Albert D. Kallal
Guest
Posts: n/a
 
      23rd May 2007
I have a nice working sample that does a merge of the current record to
word.

The sample I have can be found here:
http://www.members.shaw.ca/AlbertKal.../msaccess.html

what is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)


 
Reply With Quote
 
Graham Mandeno
Guest
Posts: n/a
 
      23rd May 2007
Hi Tom

For a start, DO NOT try to do this by embedding a Word document.

There are two possible approaches, both involving the automation of Word
(calling up its functionality from within Access).

The first is to create a Word template with bookmarks in it at the places
you want the values from your database fields to be filled in. Your code
then creates a new document based on the template, and goes through it
substituting the field value for each of the bookmarks. Then it saves
and/or prints the resulting document. This approach is best for doing a
single record at a time.

The second approach is to create a mail merge master document, containing
merge fields corresponding to your data fields. This approach is best for
generating many letters from a selection of your data. Word can merge
directly from an Access query as its data source, but personally I thing it
is preferable to export the query data set as a delimited text file, and use
that as the merge data source. Your code needs to export the data to a
temporary file, open the Word merge master, set its merge data source, and
then perform the merge, either to a new document which can be edited and/or
saved, or directly to a printer.

Albert Kallal has some example code here:
http://www.members.shaw.ca/AlbertKal...rge/index.html

--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

"njem" <njemtcan-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've worked with Access in years past and just getting up to speed on
> 2007. I've been reading reams of help files and trying various ways
> for hours to make a simple form. I need to pull up a person in the db,
> click a button and print one of a list of form letters (reports) to
> that person. I've tried creating a letter in Word and embedding it.
> Even when I set it "to fit" it is reduced in size. If I stretch it it
> looks funny. Regardless I then need to overlay field boxes everywhere
> they're needed and try to get them to align with the letter. This also
> means fields can't have any following text on that line because the
> letter text isn't going to adapt to the field length.
>
> I'm sure I could create a macro to export the selected data to a text
> file that Word could use as a merge source, but there are about 100
> different letters. So the operator would need to run the export macro,
> switch to Word, open the correct letter, merge, then back to Access.
> Not very workable to do many times a day in rapid succession.
>
> I really hope I'm missing some easy way to do this. Any suggestions?
>
> Thanks,
> Tom
>
> Originally posted in "forms".
>





 
Reply With Quote
 
njem
Guest
Posts: n/a
 
      24th May 2007
Albert,

Your method looks promising. I downloaded WordMerge20.mdb. When I run
it in Access 2007 nothing works. Probably some setting on my end. Even
the close button doesn't work. I checked the DAO setting as mentioned
on your page. Any ideas?

Thanks,
Tom

 
Reply With Quote
 
Tom Wickerath MDB
Guest
Posts: n/a
 
      24th May 2007
SQL Server Reporting Services



"njem" <njemtcan-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've worked with Access in years past and just getting up to speed on
> 2007. I've been reading reams of help files and trying various ways
> for hours to make a simple form. I need to pull up a person in the db,
> click a button and print one of a list of form letters (reports) to
> that person. I've tried creating a letter in Word and embedding it.
> Even when I set it "to fit" it is reduced in size. If I stretch it it
> looks funny. Regardless I then need to overlay field boxes everywhere
> they're needed and try to get them to align with the letter. This also
> means fields can't have any following text on that line because the
> letter text isn't going to adapt to the field length.
>
> I'm sure I could create a macro to export the selected data to a text
> file that Word could use as a merge source, but there are about 100
> different letters. So the operator would need to run the export macro,
> switch to Word, open the correct letter, merge, then back to Access.
> Not very workable to do many times a day in rapid succession.
>
> I really hope I'm missing some easy way to do this. Any suggestions?
>
> Thanks,
> Tom
>
> Originally posted in "forms".
>


 
Reply With Quote
 
'69 Camaro
Guest
Posts: n/a
 
      24th May 2007
Everyone please note that Aaron Kem.pf is attempting to impersonate one of
our regular posters again.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.


"Tom Wickerath MDB" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> SQL Server Reporting Services
>
>
>
> "njem" <njemtcan-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I've worked with Access in years past and just getting up to speed on
>> 2007. I've been reading reams of help files and trying various ways
>> for hours to make a simple form. I need to pull up a person in the db,
>> click a button and print one of a list of form letters (reports) to
>> that person. I've tried creating a letter in Word and embedding it.
>> Even when I set it "to fit" it is reduced in size. If I stretch it it
>> looks funny. Regardless I then need to overlay field boxes everywhere
>> they're needed and try to get them to align with the letter. This also
>> means fields can't have any following text on that line because the
>> letter text isn't going to adapt to the field length.
>>
>> I'm sure I could create a macro to export the selected data to a text
>> file that Word could use as a merge source, but there are about 100
>> different letters. So the operator would need to run the export macro,
>> switch to Word, open the correct letter, merge, then back to Access.
>> Not very workable to do many times a day in rapid succession.
>>
>> I really hope I'm missing some easy way to do this. Any suggestions?
>>
>> Thanks,
>> Tom
>>
>> Originally posted in "forms".
>>

>



 
Reply With Quote
 
Albert D. Kallal
Guest
Posts: n/a
 
      24th May 2007
> Albert,
>
> Your method looks promising. I downloaded WordMerge20.mdb. When I run
> it in Access 2007 nothing works. Probably some setting on my end. Even
> the close button doesn't work. I checked the DAO setting as mentioned
> on your page. Any ideas?
>
> Thanks,
> Tom
>


Look at near the top of the application...is there not a "security" warning
about allowing macros code in the application?

change your security settings to low (else, any application with code you
attempt to run will not work).

to change, either click on the options for the above bar, but really, just
go:

office button-> access options (lower right)
-->trust center--->Trust center settings
---->macro settings

check the "enable all macros option"

Now, exit ms-access...and try the application again....


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)


 
Reply With Quote
 
njem
Guest
Posts: n/a
 
      25th May 2007
On May 24, 3:29 am, "Albert D. Kallal" <PleaseNOOOsPAMmkal...@msn.com>
wrote:
> > Albert,

>
> > Your method looks promising. I downloaded WordMerge20.mdb. When I run
> > it in Access 2007 nothing works. Probably some setting on my end. Even
> > the close button doesn't work. I checked the DAO setting as mentioned
> > on your page. Any ideas?

>
> > Thanks,
> > Tom

>
> Look at near the top of the application...is there not a "security" warning
> about allowing macros code in the application?
>
> change your security settings to low (else, any application with code you
> attempt to run will not work).
>
> to change, either click on the options for the above bar, but really, just
> go:
>
> office button-> access options (lower right)
> -->trust center--->Trust center settings
> ---->macro settings
>
> check the "enable all macros option"
>
> Now, exit ms-access...and try the application again....
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKal...@msn.com


I seem to be having a heck of a time getting my posts to show up here.
I think this is the third time I've posted or responded, checked hours
later, and no post. So I'm posting again.

My macro setting were set to allow only signed macros. Apparently ones
I made myself in the ap were accepted. But with that setting it gives
no message when other macros are blocked.

Your WordMerge works great. I'm using it in the no-prompt, print-and-
discard mode.

One quirk, the forms came up tiny at first. I viewed them in design
mode, checked there size values, did a save, and then they showed up
very big. I fixed the sizes and then no problem. Maybe something about
2007?

You solved my problem. Thanks,
Tom

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form letter Princess Diana Microsoft Access Forms 1 19th Jun 2008 04:23 PM
How to do a form letter? njem Microsoft Access Reports 0 23rd May 2007 02:57 AM
Open Word Form Letter from A2K Form Showing Current Record =?Utf-8?B?RGV3ZXk=?= Microsoft Access VBA Modules 2 3rd Mar 2006 05:00 PM
how do I set up a form letter =?Utf-8?B?amltZGs=?= Microsoft Outlook Discussion 1 15th Jun 2005 10:35 PM
Form Letter Dave Microsoft Access 3 11th Dec 2003 12:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:00 PM.