Moving VB6 array via formfields to Word 9.0 document

S

Susan

I am trying to move the data in a two column grid to a
word document with the same format (2 Columns). Currently,
I am able to do so by copying the data over formfield by
formfield. The problem is, the data can be variable from 0
to 26 lines and I wish to delete the unused lines. I can
delete the unused formfields from the document, but I am
unable to delete the unused lines. Does anyone have any
ideas on how to delete the unused lines, or any ideas on
moving the data(in an array in VB6) over to two columns in
the word document - other than the formfield approach?

Thanks for your consideration!
 
C

Cindy M -WordMVP-

Hi Susan,

Hard to answer without knowing more about what the end result
should be. Do you NEED a protected form in the end result,
with data in form fields so that the user can change it?

Which version of Word?
I am trying to move the data in a two column grid to a
word document with the same format (2 Columns). Currently,
I am able to do so by copying the data over formfield by
formfield. The problem is, the data can be variable from 0
to 26 lines and I wish to delete the unused lines. I can
delete the unused formfields from the document, but I am
unable to delete the unused lines. Does anyone have any
ideas on how to delete the unused lines, or any ideas on
moving the data(in an array in VB6) over to two columns in
the word document - other than the formfield approach?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
S

Susan

Hi Cindy:

The form does not need to be protected, the fields could
be changed, but shouldn't. I just do the programming,
another person creates the forms. She gave me a form with
a table that had two clomns with a list of formfields in
each column. I then prefilled the form fields in VB6. The
problem is the list of formfields is often larger than I
need and I don't know how to delete them from VB. It works
if the table isn't there, but then the two columns don't
line up. Any ideas would be appreciated.

Thanks!
 
C

Cindy M -WordMVP-

Hi Susan,
The form does not need to be protected, the fields could
be changed, but shouldn't. I just do the programming,
another person creates the forms. She gave me a form with
a table that had two clomns with a list of formfields in
each column. I then prefilled the form fields in VB6. The
problem is the list of formfields is often larger than I
need and I don't know how to delete them from VB. It works
if the table isn't there, but then the two columns don't
line up. Any ideas would be appreciated.
Well... using newspaper type columns, if you put an
additional, continuous section break at the end of the
columns that will usually balance them out. (If this is Word
2002 or later you have to watch out for a particular option
in Tools/Options/Compatibility that will disable this.)

But I'd be more inclined to say the starting document should
have only the very first data row, and you insert rows with
additional form fields as required. It's usually easier to
insert than to delete what you don't need. Usually, when I
have to do this, I'll store the basic row as an AutoText
entry in the template and insert that as required.

The only "gotcha" you might run into, here, is if you try to
use form fields in the additional rows, and address them by
name. But it sounds like the person could give you the table
with only a single data row, and you could add rows that
don't contain form fields? Just dump the data into the cells?
the form fields are just a "please put this kind of data
here" marker, if I'm following correctly...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top