Galaxian
02-19-2012, 01:28 AM
Hi,
I have assigned an Excel macro to a content form button described as "Create letter report". I've manged to figure out how to launch a word document using that button.
However, I wish to achieve the following:
1. Push specific cell values to be incorporated within a paragraph in Word
2. Get word to display a pie chart (or similar object) shown within the Excel file
For the cell values, I've read that it might be appropriate to create a bookmark in Word and cross reference the name into the Excel VBA code, so that it can be 'replaced'. How does Word handle the formatting? Let's say the Word font is different to Excel; how do I ensure that the Word font prevails?
Can you please explain how I differentiate between different worksheets within a workbook in the macro, i.e. cell A1 sheet 1, A1 sheet 2, etc?
The idea is that Excel does the number crunching and produces nice graphs & figures. I would like the package to appear totally integrated so I want to create a button within an Excel worksheet, which can then 'export' the relevant data to a Word template.
For the objects it would appear that Word would be able to pull the pie charts, etc. through given that it will be launched using the Excel VBA code. Is this the best way and how is it done?
Very new to VBA (i only have an awareness of how to create an Excel macro by copying & pasting code), so go easy on me!
Thanks for your help.:mkay
I have assigned an Excel macro to a content form button described as "Create letter report". I've manged to figure out how to launch a word document using that button.
However, I wish to achieve the following:
1. Push specific cell values to be incorporated within a paragraph in Word
2. Get word to display a pie chart (or similar object) shown within the Excel file
For the cell values, I've read that it might be appropriate to create a bookmark in Word and cross reference the name into the Excel VBA code, so that it can be 'replaced'. How does Word handle the formatting? Let's say the Word font is different to Excel; how do I ensure that the Word font prevails?
Can you please explain how I differentiate between different worksheets within a workbook in the macro, i.e. cell A1 sheet 1, A1 sheet 2, etc?
The idea is that Excel does the number crunching and produces nice graphs & figures. I would like the package to appear totally integrated so I want to create a button within an Excel worksheet, which can then 'export' the relevant data to a Word template.
For the objects it would appear that Word would be able to pull the pie charts, etc. through given that it will be launched using the Excel VBA code. Is this the best way and how is it done?
Very new to VBA (i only have an awareness of how to create an Excel macro by copying & pasting code), so go easy on me!
Thanks for your help.:mkay