Making text BOLD

M

Mike Green

Hi all
I have a report that is generated from my Db. The report takes the form of
a letter to the customer where the fields are populated with text
concatenated with data from the Db. All is fine apart from the user now
requires that the data fields appear in Bold so that they stand out in the
letter?
The problem is that the data fields can be of very different length and in
order to get the letter to flow correctly the only way I could think of
doing it was as below. Does anyone have a solution on how to get just the
data fields to appear in bold?

Thinks in advance.

Mike

***********************current code*****************************
="Our records show that the payment for your " & [Caravan] & " is due for
renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and this
year the rate is £" & [RateCost] & " including VAT. This is based on your
previous rental period of " & [RateDurationText] & "."

********end code*************************************************
 
R

ruralguy via AccessMonster.com

I believe Stephan Lebans Rich Text control can solve your issue.
http://www.lebans.com/richtext.htm

Mike said:
Hi all
I have a report that is generated from my Db. The report takes the form of
a letter to the customer where the fields are populated with text
concatenated with data from the Db. All is fine apart from the user now
requires that the data fields appear in Bold so that they stand out in the
letter?
The problem is that the data fields can be of very different length and in
order to get the letter to flow correctly the only way I could think of
doing it was as below. Does anyone have a solution on how to get just the
data fields to appear in bold?

Thinks in advance.

Mike

***********************current code*****************************
="Our records show that the payment for your " & [Caravan] & " is due for
renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and this
year the rate is £" & [RateCost] & " including VAT. This is based on your
previous rental period of " & [RateDurationText] & "."

********end code*************************************************
 
G

Geoff

Mike,

If you wanted to achieve your objective only using Microsoft products, then
it can be done, but it's not quite so straightforward. You can set up your
letter as a Microsoft Word template and mailmerge the data into the template
from the Access database. You can insert any formatting you like into a
Word template, ie you are not limited if the formatting becomes
sophisticated. You can automate the mailmerge using VBA.

One issue you had to work around with Access 2000 (I don't know about later
versions of Access) was that, when you executed the merge using VBA, a
second copy of the database would open and it wouldn't close when the
mailmerge finished. The workaround, which is detailed in the book "Access
Cookbook" by Getz, Litwin and Baron, involves using a query to export the
mailmerge data to an RTF (Rich Text Format) file, performing the mailmerge
between the Word template and the RTF file, and then deleting the RTF file.
It's not difficult but there are a number of steps you need to perform
carefully, so it might be best to get hold of the book.

One further tip if you go down this road, use a Word template, not a Word
document. Use Word's CreateDate() function in the template to insert the
current date into the letter. The CreateDate() function returns the date on
which a document is created (when a document is created from a template) and
that date will not change if you save the document and subsequently open it
on a later date. If you use the Date() function instead, you'll be in
trouble.

Geoff.
 
A

Arvin Meyer [MVP]

An example of using a Word Template for a data merge, is at:

http://www.datastrat.com/Code/WordMerge.txt
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Geoff said:
Mike,

If you wanted to achieve your objective only using Microsoft products,
then it can be done, but it's not quite so straightforward. You can set
up your letter as a Microsoft Word template and mailmerge the data into
the template from the Access database. You can insert any formatting you
like into a Word template, ie you are not limited if the formatting
becomes sophisticated. You can automate the mailmerge using VBA.

One issue you had to work around with Access 2000 (I don't know about
later versions of Access) was that, when you executed the merge using VBA,
a second copy of the database would open and it wouldn't close when the
mailmerge finished. The workaround, which is detailed in the book "Access
Cookbook" by Getz, Litwin and Baron, involves using a query to export the
mailmerge data to an RTF (Rich Text Format) file, performing the mailmerge
between the Word template and the RTF file, and then deleting the RTF
file. It's not difficult but there are a number of steps you need to
perform carefully, so it might be best to get hold of the book.

One further tip if you go down this road, use a Word template, not a Word
document. Use Word's CreateDate() function in the template to insert the
current date into the letter. The CreateDate() function returns the date
on which a document is created (when a document is created from a
template) and that date will not change if you save the document and
subsequently open it on a later date. If you use the Date() function
instead, you'll be in trouble.

Geoff.



Mike Green said:
Hi all
I have a report that is generated from my Db. The report takes the form
of a letter to the customer where the fields are populated with text
concatenated with data from the Db. All is fine apart from the user now
requires that the data fields appear in Bold so that they stand out in
the letter?
The problem is that the data fields can be of very different length and
in order to get the letter to flow correctly the only way I could think
of doing it was as below. Does anyone have a solution on how to get just
the data fields to appear in bold?

Thinks in advance.

Mike

***********************current code*****************************
="Our records show that the payment for your " & [Caravan] & " is due for
renewal. The payment is/was due on " & [CustomerPaymentDueDate] & " and
this year the rate is £" & [RateCost] & " including VAT. This is based
on your previous rental period of " & [RateDurationText] & "."

********end code*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top