Merging specific cells via VBA macro

A

Andy Entrekin

I posted the following query in the Tables area, but then saw that mos
VBA questions were here. Please forgive the double-posting.

I need help with a macro to merge a specified set of cells in a table i
a Word 2007 document. My goal is to use code to avoid having to tel
hundreds of users which cells to select and merge in a large table
since asking them to do that would inevitably lead to problems. Wha
I've determined so far is that I can't record such a macro, because
can't select the table cells once the macro recorder is active. Once th
cells are merged, I want to enter and format text, also using the macr
(since it will always say exactly the same thing, to meet regulator
requirements).

As an example, I'd like a macro that will:
Merge the cells from row 32, column 18 through row 38, column 25
Enter the text "Approved Document" in the merged cell and format it a
bold and red.

Any and all help will be greatly appreciated
 
K

kipster

Andy said:
I posted the following query in the Tables area, but then saw that mos
VBA questions were here. Please forgive the double-posting.

I need help with a macro to merge a specified set of cells in a table i
a Word 2007 document. My goal is to use code to avoid having to tel
hundreds of users which cells to select and merge in a large table
since asking them to do that would inevitably lead to problems. Wha
I've determined so far is that I can't record such a macro, because
can't select the table cells once the macro recorder is active. Once th
cells are merged, I want to enter and format text, also using the macr
(since it will always say exactly the same thing, to meet regulator
requirements).

As an example, I'd like a macro that will:
Merge the cells from row 32, column 18 through row 38, column 25
Enter the text "Approved Document" in the merged cell and format it a
bold and red.

Any and all help will be greatly appreciated.

I replied on the other threa
 

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