Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Merging SQL into WORD letter that is locked for tabbing

Apr 27, 2007 1:43AM PDT

I have a WORD letter that I need to merge SQL data into and be able to lock the document to set tabbing for the user. It is letting me do one or the other, but not both. Any suggestions?

Discussion is locked

- Collapse -
Are you attempting to create a "report"?
Apr 27, 2007 1:48AM PDT

Your post is a little unclear since locked tabbing could mean one thing and a locked document means something else in Word.

Bob

- Collapse -
Locked tabbing vs. locked document
Apr 27, 2007 1:59AM PDT

Well, we are locking the document. We have never heard of locked tabbing. Do you think that makes the difference?

- Collapse -
That makes only a little more sense.
Apr 27, 2007 2:03AM PDT

What I import stuff I unlock the document, import and lock. All this was done in VBA code. Sadly that code is not shareable due to it's a "work" piece and I'd have to ask to share.

But maybe that will give you more of a clue.

-> Yes it makes a difference. But you didn't answer my question or give up much more detail about what you wanted to achieve. I will share that working with a locked document is a dead end. I tend to toss that out during the automatic updates so I can get it done. There are those that much have the document locked and as such we have to sit and wait for the world to close in on those before they relent and move to what works.

Bob

- Collapse -
SQL merge & tabbing ability
Apr 27, 2007 2:09AM PDT

I have a WORD letter that I need to merge in some SQL data plus provide the user tabbing from field to field on the fields that SQL doesn't populate.

- Collapse -
Sounds like VBA code to me.
Apr 27, 2007 2:41AM PDT

Once the SQL merge is done then your vba code runs to lock what you want locked.

-> Let's be clear here. This is all "advanced" stuff. It will frustrate a non-programmer or someone that expected Word to have boxes to click to get the effect you asked for.

Bob