![]() |
#5
|
||||
|
||||
![]()
Hi Chuck,
For some code to transfer form content from Word to Excel, see: http://www.vbaexpress.com/forum/show...el-spreadsheet Note that, although the primary macro there is for exporting content control data, my last post in that thread shows how to modify the code to work with formfields instead. The other important difference is that the code there is intended to be added to an Excel workbook and run on demand, rather than when a particular formfield is updated. The problem with adding the code to a Word document (or its template) and triggering its execution from Word is that you then need to have extra checks to make sure all the required fields have been completed; otherwise, simply triggering the macro could lead to empty or partially-complete records in Excel. Even with that controlled you could still end up with duplicate records in Excel. Plus, even without the above considerations, the code to do this from Word is considerably more complicated, due to the need to check things like whether the destination workbook is already in use.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
bremen22 | Excel Programming | 1 | 08-07-2013 11:01 AM |
![]() |
Joe Patrick | Word VBA | 2 | 01-30-2012 07:23 AM |
![]() |
Sammael | Excel | 6 | 11-05-2011 06:52 AM |
![]() |
Paul-NYS | Excel | 3 | 09-26-2011 10:49 PM |
How do I set up the fields in mail merge word 07 from my data base | mbcrabber | Mail Merge | 4 | 06-06-2010 01:25 PM |