I'm trying to merge an old multiple choice and true false test from some XML
to Word. I've opened the XML in Excel to get rid of a bunch of tags and
attributes that I don't need.
The problem is that each question has a record for each answer so the
multiple choice questions will look like this:
ID1 questiontext answer 1
ID1 questiontext answer 2
ID1 questiontext answer 3 true
ID1 questiontext answer 4
And the true false will look like:
ID2 questiontext true
ID2 questiontext false true
All parts of a given question have the same ID number.
I want to merge then into a word document so that I have each question only
appear once, and then have the answers appear below. Then have the next
question and so on.
I tried using SET to set a currentID variable and then NEXT to see if the
next record had the same ID, but since that cannot be used inside
conditionals I am getting nowhere.
Basically what I want to do is say, if this record has a different ID than
the one before, merge this, this and this, if it has the same ID as the one
before then only merge this and this.
Is there a way to do this?
Peter Jamieson - 17 Oct 2007 10:16 GMT
See the following article and adapt the field names for your data:
http://support.microsoft.com/?kbid=294686
Peter Jamieson
> I'm trying to merge an old multiple choice and true false test from some
> XML
[quoted text clipped - 31 lines]
>
> Is there a way to do this?
Rothrock - 26 Oct 2007 17:48 GMT
Thanks. I had worked out something similar to that. But without the MERGESEQ.
So I had to go in and fix up the first one by hand.