It’s getting there (Document Overview Report)

Progress

I’ve added in Images, Shapes and Custom Styles into the report generator. So it’s coming along.

However, it’s not without any difficulties due to the way Word VBA handles the insertion of a new table. I’m still getting used to the way that it works, for example:

Normally, you find the table in your document and then edit the cells, change the formatting or whatever else you want to do afterwards.

However, when you’ve inserted a new table into a separate document (besides the to-ing and fro-ing between the two documents), you have to insert the table, then loop around and add the cell contents (from the array) and *then* you apply your choice in formatting afterwards. If you do it in any other order, it basically ignores all of your commands. This has been very confusing during the development of the reporting function.

What’s left to do

Looking at my Trello card that lists the work done and the work that I still need to do, there are a few more mini-functions to report on. I also need to tidy up the Which Fonts routine – what appears on-screen and inside the report.

I also need to include an option to skip past certain options (e.g. Fields) in the report if their count is too high, e.g. more than 100 fields. One of my test documents is very TOC-heavy as the field count goes up to 900+ entries. This breaks down to the usual field entries in the footer for page count, current page number and such like. Where it increases to silly amounts is down to the TOC. For each entry it’s one field for the actual section of the document that it’s referring to and another for the hyperlink that jumps to the correct section as well. The totals soon rack up.

I know I’ve said this before in other posts regarding this function, but it’s getting there. Honest!

New beta available (v2.1f)

I’ve finally released a beta version of the Toolbox now that the Report Overview function exports into proper tables. The full suite of reporting options aren’t in there as I’ve got to add Custom Styles, various language detection, template names and both types of image: inline and shapes. But it gives you an idea of what the function will be able to do – that is, what you would see in the Toolbox’s GUI, is now dumped out to a Word (or a PDF) document.

My next stage for the website update is to start adding videos showing how the functions work “in real life”, with proper test documents. I attended the Manchester WordPress User Group last night at MadLab for the first time last night and picked up some good hints and tips on image optimisation from one of the speakers (Kayleigh Thorpe from 34sp.com).

I also talked to her during the clinic time afterwards about using videos and she gave me some good hints and tips. Whether I use my current YouTube account, or create one specifically just for this website is a decision I’ll make at some point.

Another update on the Document Review function

It’s coming along nicely. Albeit with a lot of grey hairs being added to the head (and beard) as I split the functions apart from the listboxes into arrays.

This morning I finished moving the Fields code out of the form and into the new ‘MainLoops’ module and it, like the others before it, now uses arrays. This means the listbox can be populated as well as the report using the same data.

All that’s left to do (ha!) are: tables, images (both inline and floating) and custom styles.

What’s they’re done, then I need to investigate how to “make it look pretty” by using tables to display the data. The report does look a little bit on the ugly side when there are hundreds of fields (e.g. caused by a large Table of Contents) being dumped into the report.

When I’ve got all of the export features embedded (in their current ‘ugly’ mode) then I’ll release a beta version so that I can get some input on what other’s see when they link the report to their Normal.dotx files.

Document Report/Overview update

Work has been continuing on this new feature. And it’s coming along quite nicely once I’d got past some severe head-scratching bits where I had to liaise with my Australian guru (Ken Endacott) about why code to export to a Word document that worked fine in one of my Excel projects, just wasn’t working as I’d expected it to do in Word. Got there in the end 🙂

Each function that lives on the ribbon of the Toolbox, there’s an InspectXXX function that works out the details and populates a list box on the respective form. What I have to do is unravel this inspection code from the form, put it into a separate module and then recode it so that the same information is now sent to an array instead. The form’s listbox is then pointed at the array and likewise the report code can also see and extract information from the array.

So far I’ve managed to port across the Comments, Bookmarks and Sections code so that either the form or the report can access them. These were picked as they’re slightly smaller than the others, such as the Image and Shapes code. In total, there’s another 7 or 8 forms and/or functions that need converting. The report can also be exported into a PDF file too.

It’s slow going, but I’m getting there.