(Solved) – If possible: How to write a Word Macro which swap the content of the two textboxes on an active page?

(solved)-–-if-possible:-how-to-write-a-word-macro-which-swap-the-content-of-the-two-textboxes-on-an-active-page?

I have a Word Document which creates indexcards for books via series. On every page information about a single book. Sometimes two fields have to be swaped for a specific item. So for my collegue it would save a lot of work if that would be possible with a single click. I have programming experience but not so much Office and no VBA.
Is it possible to do something like below? :

Pseudo code:
dim temp as string
dim temp2 as string
select first textbox on active page
temp = select.Text
select second textbox on active page
temp2 = select.Text
select.Text = temp
select first textbox on active page
select.Text = temp2

Any ideas what functions to look in would be welcome. Especialy if it is possible to select the first and second textbox of a single (active) page.

Leave a Reply

Your email address will not be published. Required fields are marked *