Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2018, 04:25 PM
Tal71 Tal71 is offline Open Excel, copy & paste data & chart Windows 10 Open Excel, copy & paste data & chart Office 2016
Novice
Open Excel, copy & paste data & chart
 
Join Date: Aug 2018
Posts: 1
Tal71 is on a distinguished road
Default Open Excel, copy & paste data & chart

I have a Word document that I already run several macros on. I now want to add an additional macro that will do the following (I'm not sure if this can all be done through a Word macro or if after opening the spreadsheet I need to run another macro through Excel.)
  • From the open Word document (named "workingquote.docx",) open a spreadsheet with the name "WorkingSheet.xlsm"
  • Prompt user for data to input in several cells (I figured out the code to do this part in an excel macro but not sure if it can be done through the word macro?) This data updates a graph
  • Copy a range of cells in excel document to the clipboard
  • Switch back to the word document named "workingquote.docx" & go to a bookmark named "ROITable" and paste the data from the clipboard
  • Switch back to Excel doc "WorkingSheet.xlsm", copy a graph named "SolarValue"
  • Switch back to the word document named "workingquote.docx" & go to a bookmark named "ROIGraph" & paste into the Word document named "workingquote.docx".
  • Close the excel document (don't need to save it but do need to retain the data in the word document)



Cross posted to:
https://www.mrexcel.com/forum/genera...xcel-word.html
https://www.excelforum.com/excel-pro...l-to-word.html

Last edited by Tal71; 08-14-2018 at 05:21 PM. Reason: added crosspost links
Reply With Quote
  #2  
Old 08-14-2018, 05:54 PM
macropod's Avatar
macropod macropod is offline Open Excel, copy & paste data & chart Windows 7 64bit Open Excel, copy & paste data & chart Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There are many examples of code on all three forums for automating Word from Excel and vice-versa. I suggest you do a search for some code you can adapt and, if you run into difficulties with the implementation, post back with the specifics.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-14-2018, 08:28 PM
gmayor's Avatar
gmayor gmayor is offline Open Excel, copy & paste data & chart Windows 10 Open Excel, copy & paste data & chart Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

See if https://www.gmayor.com/mail_merge_charts.htm or https://www.gmayor.com/mail_merge_charts_2.html helps
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Excel, copy & paste data & chart Why does PPT reformat my data when I copy & paste to another file? Maxwellmorlay PowerPoint 1 04-09-2017 03:22 AM
Open Excel, copy & paste data & chart Open csv files & copy and paste info into master file gbaker Outlook 9 04-22-2016 11:02 PM
How to Copy data from Outlook mail and Paste it in a Excel sheet? padhu1989 Outlook 0 09-11-2012 04:07 AM
Can't Copy and Paste until new message is open tabletop Outlook 0 12-04-2009 11:38 AM
Open Excel, copy & paste data & chart Paste chart from Excel bielak01 Word 4 04-29-2009 02:42 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft