in Word VBA, find the current position in a table, then do a merge of the whole line and write Text in it

Dear Sir, Dear Madam

In Word VBA, I would like

1. to find the current position in a table
2. then do a merge of the whole table line
3. write Text in it

Is there a way to do this?

Sincerely

Ivo Raemy
Ivo RaemyAnalyst ProgrammerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DrTribosCommented:
From memory:

Selection.Range.Rows (1).Cells.Merge
Selection.Range.Text = "Your Text Here"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DrTribosCommented:
Selection always gives you the position of the cursor, I hope that is what you wanted 😊
Ivo RaemyAnalyst ProgrammerAuthor Commented:
Great, it works
DrTribosCommented:
No worries, you can also use (again, from memory) selection.range.information to find out if you are in a table and avoid any error if you are not in a table
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.