PDA

View Full Version : Create Word report by parsing current document



par4724
12-16-2009, 04:22 PM
Hello, I've been away from VBA for quite some time but I wanted to know if it is at all possible to create a Word report by parsing the current document? Where I work we are under certain time contstraints and the company uses a Word log that is generated by users who then have to create a report from the log. I wondered if Word is the right tool to use or whether anybody would know of a better/eaiser way of doing this? I'm looking forward to creating the script/macro but i'd like to find out if this is the road that I go down before wasting hours of my time.:think:

Thanks and regards,
Paul.

Tinbendr
12-16-2009, 07:17 PM
Yes it's possible.

Sample needed.

Upload using "Manage Attachments".


script/macro but i'd like to find out if this is the road that I go down before wasting hours of my time.When you don't know how to get there, expect a few wrong turns during the journey.

fumei
12-17-2009, 09:39 AM
"I wanted to know if it is at all possible to create a Word report by parsing the current document? "

I agree, it most certainly is possible. Define the terms of your parsing.

par4724
12-17-2009, 03:54 PM
Hi,

I have attached the 'LOG' which is the first document (the one to be parsed).

Regards,
Paul

par4724
12-17-2009, 04:07 PM
Hi,

Here is the report that I would like to end up with. Certain key words are parsed from the first document and compiled into a report (this is a crude version but I hope you get the idea). If anybody could point in the direction of some ideas i'd be grateful.

Thanks in advance,
Paul.

lucas
12-17-2009, 04:11 PM
They look almost identical except for the legal notice....and the header. That it?

par4724
12-17-2009, 04:33 PM
Yeah, I thought that when I created them. I couldn't use the original documents as they are work related but that's basically it - parse the one document for certain fields and then put them into the next document. The finished report will have some photographs in there as well but i'll cross that when I come to it.

Thanks,
Paul.

fumei
12-21-2009, 01:57 PM
Again, define precisely what are your requirements. Word most certainly can parse through a document and extract whatever (essentially) whatever it is you need to extract.