Solved

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

Posted on 2008-10-28
6
247 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
I got it to work with some minor changes.  Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now