Overtype rather than inserting

G

Gavin

I am trying to make a fixed length file record to import into an investment
system.

The basic data is stored in an excel database and the problem I have is
where the field I am
putting into the record is not the same length as the field in the fixed
length record.

Example

The field pfolio has a maximum length of 6 characters

if the field pfolio is ABC in the spreadsheet then it needs to be ABCbbb in
the fixed length
record

My first thought was to create a record of the appropriate size populated
with blanks then
to import the fields from the spreadsheet.

If the document is in overtype mode and I am manually type in ABC then is
fine as the 3 blank
charaters are still in place but I do not know how to do this using VBA

The ABC is always inserted at the front of the blank charaters e.g

Record = bbbbbbbbbbbbbbb if the pfolio field offset is at 5 and I want to
import ABC then I want
to see "bbbABCbbbbbbbbb" instead I end up with "bbbABCbbbbbbbbbbbb"

The command Options.Overtype = True does not seem to help.

If you have any suggestions I would be most grateful.

Regards
Gavin

P.S. I am using Word 97
 

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