G'day there Jack,
> > * * * * I'm currently working on an automation project in whichI have a
> > report in Word that refers to data in various Excel worksheets which are
> > of different layouts. The layouts are preset (by higher powers than my
> > humble position) in the database report builder and I have no ability to
> > influence the layouts or formats. To select which cells are referred to
>
>
> It sounds like you have a fun project to work on. I'm not sure my
> suggestions will help but I think I've had to do something similar in
> the past.
You're right, it IS fun, but I'm certainly practising my
vocabulary of swear words

It might be quite a bit easier if I had a
clue about what I was doing <g>.
> The way I would do this is to not display the word document
> until the users were done selecting whatever value(s) they needed in
> Excel. I would then instantiate an instance of word within Excel VBA,
> use bookmarks to insert the values that were selected in excel, then
> finally open the word document for display. I've not ever tried
> anything like this while the word document was visible.
Nodnodnod. I can understand your thinking. I much prefer to work
in Excel's object model. Also, since the reports are exported as XL
workbooks it's just plain common sense to use it. Usually I'm bound by
what other people have designed and I'm stuck with trying adapt their
documents. Maybe this time I can have a win!!
If I can get it going properly I may be able to convince the
powers that be to use what I come up with. I know it will be adopted at
a local level since the people I work with will be pleased to have their
job simplified. Those higher up tend to want their own name attached to
any projects... especially successful ones.
I may be stuck with Word eventually, but I'll have a go at trying
to adapt the form to Excel. The main problem there will be trying to fit
various arbitrary table formats into something consistent. I can easily
write code for the formats I already know about, but I have to write
something that non pooter-literate staff can use to suit any report
formats that don't yet exist. Not impossible, but might be awkward. I'll
have a look at it anyway and see what I can do while continuing with
what I've started.
> I know this is not exactly what you want to do but perhaps by reducing
> the scope a bit you can get it done and move on rather than fight it
> for the rest of your career.
Heeheechuckle!! My career is non existent. I program applications
for personal satisfaction and to assist my co-workers
...sometimes people even say "Thankyou!!"
Thanks for your suggestion,
Take care,
Ken McLennan
Qld, Australia