View Single Post
 
Old 03-03-2015, 05:30 AM
AdieReeves AdieReeves is offline Windows XP Office 2007
Novice
 
Join Date: Oct 2014
Posts: 9
AdieReeves is on a distinguished road
Default Word VBA help to copy cell info from Excel to Word

Hi all, I am trying to write a macro in WORD 2007 which will:
- open the Open File Dialogue for the user to select an EXCEL file
- select a range of data (one column, but a variety of rows)
- copy the data to the clipboard
- switch back to WORD

It has to be run from Word as the Excel sheets are already in use by a large number of users, have been populated with varying data from a large number of sites and depending on the Users profile and preferences could be stored in a variety of locations with varying file names (hence the open file dialogue). It would be a major headache to change every single excel file to add this macro whereas the Word document I'm creating is new and will eventually be sent to all. The excel sheet is used for collecting data (monitor number, location, info collected from site visits) and not intended for printing (main objective to populate pre formatted graphs). The Word document will create a BLANK form with only the monitor number and location filled in on a nicely presented table for non-laptop owners to hand write the findings on which can be transferred to the sheet at a later date. The reason I'm using Word is that I have a little more control over the formatting of the page layout, cell borders etc (yeah, I know!) and there will be other word processed client specific text inserted between tables with bookmarks and Quick Parts . Once the data is on the clipboard and the window has switched focus to Word I already have the macro set up that will select a range, paste and format as desired but would need to know how to switch back to excel to grab the next range and so on...

Thanks in advance
Reply With Quote