![]() |
#1
|
|||
|
|||
![]() Hello friends- I am working on creating a word report (i have attached the word report for your reference) from an excel export from a software(i have attached excel export ). All the data on the report is coming from an excel export. An equipment id on excel sheet (Column A) can have only one row or it can have more than one row depending on number of component. For example equipment id "000000000000018192" has two rows (two components: Heatc Exchanger-Shell, Heat Exchanger-Channel). I am creating a word report for each equipment id that will have critical data fields and all the data for those fields are coming from excel sheet. I have following questions and also seeking for advice. 1. If the equipment id has only one row then the report will be 2 page report ( template attached) , but if the equipment id has two rows then that equipment id will have 4 page report (2 page per component). I really don’t know how to do this because with mail merge I am able to create 2 page report for each row but really don’t know how to create 4 page report if equipment has 2 rows. Is Mail merge still a better option or should I handle this via VBA? 2. In the word report I am doing some conditional formatting. For example, I did conditional formatting on table 4 with help from this forum. But now I need to do conditional formatting on another table (called risk matrix : See table in page 2 in word report). I need to put a circle around the number based on the vessel inspection priority number (see yellow highlight) in the word report. Can this be done with VBA? Based on your ans if VBA is the best option then I will start working on it (may be it will take me a long time) and will definitely seek your guidance but just wanted to get your opinion before I start spending bunch of time googling and youtubing to figure out |
#2
|
|||
|
|||
![]()
I have only done one Word 2016 vba application. But mine appears to face similar challenges to yours. Since you have not enjoyed any other responses, let me share my thoughts.
Rather than mail merge, have you considered storing bookmarked documents in Word's "Building Blocks"? My project involved three types of documents: A Partial waiver, a Final waiver and a Notary form. The partial waiver can run multiple pages. I generate a notary page after the last partial page. The one-page final waiver incorporates the notary page, so it doesn't need a separate page. And the notary page itself can be a standalone document. I used bookmarks in the documents to mark for the variables and saved each document as a Building Block entry in Word's Quick Parts (Insert > Text > Quick Parts > Save Selection to Quick Parts Gallery ...). Loading and populating the forms through Word VBA forms is not particularly intuitive. And I overstayed my welcome with my posts to the StackOverflow forum as I struggled with it. But Building Blocks might be an alternative to consider. |
#3
|
|||
|
|||
![]()
Thank you very much for sharing your experience and also sharing your expertise. I did look at bookmark and its pretty interesting. I am going to explore the bookmark option as this seems the best way forward for what i want to do.
Again thank you very much |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filename options when saving in Word 2013 - using report number at top of a report ? | swayzak | Word | 1 | 09-08-2017 08:54 AM |
Switch slicer report connections between pivot table and table | tyjulianchen | Excel | 0 | 02-28-2017 04:54 AM |
Avaya split/skill report to Excel - Pivot Table | BigErnKingpin | Excel | 0 | 02-13-2017 05:28 AM |
![]() |
nightale | Word | 3 | 07-06-2014 04:17 PM |
![]() |
febec88 | Word VBA | 3 | 05-14-2014 03:20 AM |