Using Access 2003 to generate word documents

  • Thread starter Thread starter dawnm.jordan
  • Start date Start date
D

dawnm.jordan

~~Reposting with the hopes of getting a response~~

Hi,

I am working on a database used to store information, and then generate
customized letters. I have most of it working, (Thanks to the posts in
this group =)) I have a button which can be clicked and it opens word
and fills in the blanks of my template appropriately, with the
exception of 2 areas. These areas of the letter need to be pulled from
subforms of the existing form, and in the word document they need to be
a list or possibly a table, and dynamic in nature. Does anyone have
any idea how I can accomplish this? I am a novice at best, so please
speak as plainly as possible =)

Reply »

2
From: LisaMO - view profile
Date: Fri, Jun 2 2006 9:25 pm
Email: "LisaMO" <[email protected]>
Groups: microsoft.public.access.gettingstarted
Not yet rated
Rating:
show options

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author

I am working on a database used to store information, and then generate
customized letters. I have most of it working, (Thanks to the posts in
this group =)) I have a button which can be clicked and it opens word
and fills in the blanks of my template appropriately, with the
exception of 2 areas. These areas of the letter need to be pulled from
subforms of the existing form, and in the word document they need to be
a list or possibly a table, and dynamic in nature. Does anyone have
any idea how I can accomplish this? I am a novice at best, so please
speak as plainly as possible =)

Does this have to dump into word???....it's a fairly simple report in
Access
lisa

Reply » Rate this post:

3
From: (e-mail address removed) - view profile
Date: Sat, Jun 3 2006 5:15 pm
Email: "(e-mail address removed)" <[email protected]>
Groups: microsoft.public.access.gettingstarted
Not yet rated
Rating:
show options

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author
Does this have to dump into word???....it's a fairly simple report in
Access
lisa

I'd like it to dump into word so that it could be edited easily by the
user. But if that just isn't possible I could use the reports function
if I only knew how to add large amounts of static text.

Thanks for the response!

~~Dawn

Reply »

4
From: (e-mail address removed) - view profile
Date: Mon, Jun 5 2006 1:01 pm
Email: "(e-mail address removed)" <[email protected]>
Groups: microsoft.public.access.gettingstarted
Not yet rated
Rating:
show options

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author

I should mention that this is Office 2003

Any ideas would be appreciated.

~~Dawn

- Hide quoted text -
- Show quoted text -
I'd like it to dump into word so that it could be edited easily by the
user. But if that just isn't possible I could use the reports function
if I only knew how to add large amounts of static text.
Thanks for the response!

Reply »
 
If the data is in Access fields, you can use Word bookmarks.

Although not passing the same data, there's a sample of code to do this at
my website:

http://www.datastrat.com/Code/WordMerge.txt
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

~~Reposting with the hopes of getting a response~~

Hi,

I am working on a database used to store information, and then generate
customized letters. I have most of it working, (Thanks to the posts in
this group =)) I have a button which can be clicked and it opens word
and fills in the blanks of my template appropriately, with the
exception of 2 areas. These areas of the letter need to be pulled from
subforms of the existing form, and in the word document they need to be
a list or possibly a table, and dynamic in nature. Does anyone have
any idea how I can accomplish this? I am a novice at best, so please
speak as plainly as possible =)

Reply »

2
From: LisaMO - view profile
Date: Fri, Jun 2 2006 9:25 pm
Email: "LisaMO" <[email protected]>
Groups: microsoft.public.access.gettingstarted
Not yet rated
Rating:
show options

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author

I am working on a database used to store information, and then generate
customized letters. I have most of it working, (Thanks to the posts in
this group =)) I have a button which can be clicked and it opens word
and fills in the blanks of my template appropriately, with the
exception of 2 areas. These areas of the letter need to be pulled from
subforms of the existing form, and in the word document they need to be
a list or possibly a table, and dynamic in nature. Does anyone have
any idea how I can accomplish this? I am a novice at best, so please
speak as plainly as possible =)

Does this have to dump into word???....it's a fairly simple report in
Access
lisa

Reply » Rate this post:

3
From: (e-mail address removed) - view profile
Date: Sat, Jun 3 2006 5:15 pm
Email: "(e-mail address removed)" <[email protected]>
Groups: microsoft.public.access.gettingstarted
Not yet rated
Rating:
show options

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author
Does this have to dump into word???....it's a fairly simple report in
Access
lisa

I'd like it to dump into word so that it could be edited easily by the
user. But if that just isn't possible I could use the reports function
if I only knew how to add large amounts of static text.

Thanks for the response!

~~Dawn

Reply »

4
From: (e-mail address removed) - view profile
Date: Mon, Jun 5 2006 1:01 pm
Email: "(e-mail address removed)" <[email protected]>
Groups: microsoft.public.access.gettingstarted
Not yet rated
Rating:
show options

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author

I should mention that this is Office 2003

Any ideas would be appreciated.

~~Dawn

- Hide quoted text -
- Show quoted text -
I'd like it to dump into word so that it could be edited easily by the
user. But if that just isn't possible I could use the reports function
if I only knew how to add large amounts of static text.
Thanks for the response!

Reply »
 
Arvin,

Thank you for your response! I actually have used a lot of the code
you linked to already =) I found it when I was searching initially,
and it is working great for most of the document, the problem comes in
when I try to insert a list of data. For example, I have one area of
this same form that needs to insert multiple menu items which are
contained in a subform on the original form, and sometimes there might
be 1 menu item, and sometimes there might be 10 or 20.
 
Build a recordset and concatenate the field values in a string, then use the
string as the value passed to the Word bookmark. Here's how to concatenate
the values from a recordset into a string:

If rst.RecordCount > 0 Then
rst.MoveFirst
For i = 1 To rst.RecordCount
If Len(rst!Field) > 0 Then
strTemp = strTemp & rst!Field & ","
End If
rst.MoveNext
Next i

strTemp = Left$(strTemp, Len(strTemp) - 1)

End If
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

Arvin,

Thank you for your response! I actually have used a lot of the code
you linked to already =) I found it when I was searching initially,
and it is working great for most of the document, the problem comes in
when I try to insert a list of data. For example, I have one area of
this same form that needs to insert multiple menu items which are
contained in a subform on the original form, and sometimes there might
be 1 menu item, and sometimes there might be 10 or 20.
 

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

Back
Top