Excel interacting with Word

techi

New Member
Joined
Mar 23, 2016
Messages
3
My excel and word file is in same folder.


My excel file consists:


Name Amount
John $1
Mary $2
Gary $3
[button]


Let say I highlight John and $1 - this 2 cell and press the button, it would open up word.
Not only these 3 entries(not hardcoded), user could add in more entries. So I have to target A1 to end, similarly for B1 to end.


My word file :


$Name
$Amount
left
I would set a default template style , $Name will be bold left align etc. For the variable it would automatically replace with "John" value from excel.


I am new to macros, unsure how to add in macros, hope you can guide me too.


Thank you.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Where are the entries to go? All on the same page, with pages duplicated & one record per page, etc.? Where on whatever page(s)?
 
Upvote 0
Where are the entries to go? All on the same page, with pages duplicated & one record per page, etc.? Where on whatever page(s)?

Hi,

Excel there are 3 column record
A | B
Name | Amount
John | $1
Mary | $2
Gary | $3

[button]

let say i select john and $1 cell, that would be A2 and B2 and press the button.
It should open up Microsoft word software. Microsoft Word have placeholder - I type "$Name" (just a text), $Money(just a text) any where on the page, it get the value from excel and replace the value accordingly, in this case $Name will be John and $money will be $1.

Next time i input a 4th row and so on, select the 2 cell and press the button, it do the same thing - open up microsoft word software, placeholder will be replace with the value.

Thank you.
 
Upvote 0
Word has no functionality to do what you want. Besides which, if you're going to select the Excel content, you may as well select & copy it, then switch to Word and paste in wherever you want it to go - all without the bother of typing $Name or $Money.
 
Upvote 0

Forum statistics

Threads
1,223,445
Messages
6,172,176
Members
452,446
Latest member
walkman99

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top