View Single Post
 
Old 03-29-2017, 03:44 PM
Seb Seb is offline Windows 10 Office 2016
Novice
 
Join Date: Mar 2017
Posts: 7
Seb is on a distinguished road
Default

I've had a look at the macro that you have linked, and I couldn't even begin to modify it, I don't have the coding knowledge I'm afraid.

I have linked the two files that I am trying to use together. The word document is the form that we use for a detailed record of corrective actions. The excel workbook is the register that contains brief details of each corrective action in a table for tracking purposes. The table has formula and conditional formatting for ease of use.

The details that I want to export from the word document are:

Excel table column - Word Object name - Field type
Car No. - txtCARNumber - Rich text
Site Location - txtLocation - Dropdown
Date raised - txtDate - Date picker
Risk Priority - txtRisk - Dropdown
Category - txtCategory - Rich text
Details - txtDetails - Rich text
Initiator - txtInitiator - Rich text
Responsible Party - txtResponsible - Rich text
Department - txtDepartment - Dropdown
Date completed - txtDateComplete - Date picker
Date verified - txtDateVerified - Date picker

I am looking to export these specific details from the word document once they are completed and place it at the bottom of the excel table in the CAR Register worksheet such that the table can be extended with conditional formatting and formula, and the pivot graphs/tables can be updated without having to redraw the data ranges. There are also quite a few form fields in the document that I don't want exported. These are there so I can protect the document from changes while still allowing data input.

From what I have read I understand that there are possible issues using text fiends and dropdown/date picker content control for exporting. If this is an issue, I can easily change all the fields to rich text.

Could you help with creating a workable macro to complete this data transfer on a button click? The button is located at the end of the word document, called "Export to register" and is coloured dark blue. I lack the knowledge in Visual basic to create or even modify the code.

If it's also possible, is there a way of the macro completing a search of the table for the CAR No. and updating a previous entry that has this CAR No. with new details?
Reply With Quote