I
Ivan Debono
Hi all,
I use VB6 to automate Word to create documents from templates that I define.
One thing that I don't know if it's possible to do is "grouping". What do I
mean??
OK, for example I have these records:
Category1 SubCategory1 ItemA
Category1 SubCategory2 ItemB
Category1 SubCategory2 ItemF
Category2 SubCategory1 ItemC
Category2 SubCategory1 ItemD
Category3 SubCategory2 ItemE
In the document I would want them grouped as follows:
Category1
SubCategory1
ItemA
SubCategory2
ItemB
ItemF
Category2
SubCategory1
ItemC
ItemD
Category3
SubCategory2
ItemE
At the moment I'm doing this by looping through the records, and hardcoding
what fields I want to group by, and more code to check groups, add the
necessary autotextentries, set bookmarks, etc... Quite messy!!
Furthermore, I'd need it flexible enough to allow for a number of group
levels from 0 to n...
Is there a way to simplify this work???
Thanks,
Ivan
Ivan
I use VB6 to automate Word to create documents from templates that I define.
One thing that I don't know if it's possible to do is "grouping". What do I
mean??
OK, for example I have these records:
Category1 SubCategory1 ItemA
Category1 SubCategory2 ItemB
Category1 SubCategory2 ItemF
Category2 SubCategory1 ItemC
Category2 SubCategory1 ItemD
Category3 SubCategory2 ItemE
In the document I would want them grouped as follows:
Category1
SubCategory1
ItemA
SubCategory2
ItemB
ItemF
Category2
SubCategory1
ItemC
ItemD
Category3
SubCategory2
ItemE
At the moment I'm doing this by looping through the records, and hardcoding
what fields I want to group by, and more code to check groups, add the
necessary autotextentries, set bookmarks, etc... Quite messy!!
Furthermore, I'd need it flexible enough to allow for a number of group
levels from 0 to n...
Is there a way to simplify this work???
Thanks,
Ivan
Ivan