Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Export data in a textbox on a form in Access to a word document

Posted on 2008-10-28
6
Medium Priority
?
304 Views
Last Modified: 2010-04-21
I have text data in a memo field that is displayed for a record.  I need the ability to export the text data in the textbox on the form to a word document.  I have seen other postings but mostly to merge or dump from a table.
0
Comment
Question by:avalonwgi
  • 4
  • 2
6 Comments
 

Author Comment

by:avalonwgi
ID: 22825531
Could someone please respond to this?  It is important for me to continue with what I am working on and it has been 4 hours since my post.  Thanks for your help!
0
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 22828659
You can merge into a word template using bookmarks in Word. Memo data sometimes truncates (will do so if emporting from a query, but work OK if exporting from a table) and I'm not sure what would happen from a form.

Essentially, you have a word template that you open using a background instance of Word, export the text to a bookmark that exists in the correct location on the template then save this as a doc file to a location & filename that you specify..

Is this what you're looking for?


Kelvin
0
 

Author Comment

by:avalonwgi
ID: 22831183
Kelvinsparks,
That's not what I was hoping for.  I was hoping that this was similar to just exporting to excel.  I don't want to early bind, but I would like to late bind word application and then just dump the text to a new and empty word doc.  Is that possible and if so, how? (inlcuding the binding)
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 2000 total points
ID: 22835536
Ok

You can export a form to word (have to use rtf format. It doesn't look pretty but a line like this will work

DoCmd.OutputTo acOutputForm, "frmTest", acFormatRTF, , True

You could use a variation on that and  write the data to a temp table & then export that table would need an extra 3 or 4 lines of code plus a variation of the one above.

Kelvin
0
 

Author Comment

by:avalonwgi
ID: 22837267
So I can export the data, but it exports all field data on the form and not the specific fields that i want exported.  Is there a way to do this and just as text?
0
 

Author Closing Comment

by:avalonwgi
ID: 31510803
I got it to work with some minor changes.  Thanks
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question