|
Post by ninjashadow on Jun 1, 2022 17:06:00 GMT
I have two files in excel and one in word, I would like to copy the content from the excel file to the Word file in a specific order. How can I do that with Mini Mouse Macro?
I have 1000 addresses on the excel sheet that I want to copy and past on in word when I used Macro it goes just repeated on I did and it stops it doesn't continue.
How can I configure Macro to help me to achieve what I want, please
// Below is the word file that I want to copy the address to from the excel sheet ( I have a 1000 like that too)
address: "street 25 France, Paris"
address: "street 25 France, Paris"
address: "street 25 France, Paris"
"address": "street 25 France, Paris"
Thank you
|
|
|
Post by Steve on Jun 1, 2022 22:03:51 GMT
Hi ninjashadow I have an example below that will copy values from excel to a word document. The example uses the Select Window By Name action to select each saved xlsx and docx document. In the example the excel doc is saved as 'address.xlsx' and the word doc is saved a 'Streets.docx'. Goto Macro Line is used to loop through the macro 3 times. It loops 3 times because I have 3 values in the excel 'address.xlsx' document. Another thing to note is that I started the macro with the MMM internal logger off and with the first cell selected in the excel document. Selecting the first cell is the key here. 1 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::3 * | START 2 | RUN ACTION | WAIT SECONDS | 1 3 | IF | INTEGER VARIABLE | %INTEGER% | > | 0 | THEN 4 | RUN ACTION | SELECT WINDOW BY NAME | address.xlsx - Excel 5 | X | X | 250 | Keypress Ctrl+ | c 6 | RUN ACTION | SELECT WINDOW BY NAME | Streets.docx - Word 7 | X | X | 250 | Keypress Ctrl+ | v 8 | RUN ACTION | SELECT WINDOW BY NAME | address.xlsx - Excel 9 | X | X | 250 | Keypress down 10 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::-1 11 | IF | ELSE 12 | RUN ACTION | GOTO MACRO LINE | END 13 | IF | END IF 14 | RUN ACTION | GOTO MACRO LINE | START * | END
|
|