Hi guys,
I want to export data from a spreadsheet such as name, date of birth, address etc to a letter that I'm writing in word.
I've been following this tutorial up to now:
How To Integrate Excel Data Into A Word Document
I've had success in populating the information in word using a command button, but i dont want the ugly grey button in word so i tried making a macro and pasted the same script into a macro vba.
here is the script i'm using when trying to make the macro:
when i run the macro it highlights the text in bold above and says "Compile error: Method or data member not found"
I've checked and rechecked and the label name is correct, it works with the command button, i dont understand why it shouldnt work as a macro.
This is the first problem.
Secondly, instead of routing the VBA to a static cell in excel, I want to manually be able to choose which row of cells i want it to point to, or even better, i want to input a trigger word in MS Word and then I want VBA to find that triggered cell and fetch all the data in that row only.
Any helps would be much appreciated.
Thanks
CF
I want to export data from a spreadsheet such as name, date of birth, address etc to a letter that I'm writing in word.
I've been following this tutorial up to now:
How To Integrate Excel Data Into A Word Document
I've had success in populating the information in word using a command button, but i dont want the ugly grey button in word so i tried making a macro and pasted the same script into a macro vba.
here is the script i'm using when trying to make the macro:
Code:
You don't have permission to view the code content. Log in or register now.
when i run the macro it highlights the text in bold above and says "Compile error: Method or data member not found"
I've checked and rechecked and the label name is correct, it works with the command button, i dont understand why it shouldnt work as a macro.
This is the first problem.
Secondly, instead of routing the VBA to a static cell in excel, I want to manually be able to choose which row of cells i want it to point to, or even better, i want to input a trigger word in MS Word and then I want VBA to find that triggered cell and fetch all the data in that row only.
Any helps would be much appreciated.
Thanks
CF