Copy two aligned graphs into Word

Hello,
I have two graphs, one on top of the other, that I would like to cop
into a Word document just like they look in Excel.

I can copy each of the graphs separetly into Word, using the followin
VBA code

' Copy chart as a picture
Activechart.Chart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture

' Paste chart at cursor position
With wordApp
.Selection.PasteSpecial Link:=False
DataType:=wdPasteMetafilePicture, _
Placement:=wdInLine, DisplayAsIcon:=False
End With

But how to copy the two of them together just like they look in th
excel sheet? Any suggestions?

Thank you,
Sir

          Attachment filename: two aligned graphs.xls          
Download attachment: http://www.excelforum.com/attachment.php?postid=56474
--
Message posted from http://www.ExcelForum.com

0
6/3/2004 7:01:11 AM
excel.charting 18370 articles. 0 followers. Follow

4 Replies
368 Views

Similar Articles

[PageSpeed] 8

Hi,

Try grouping the charts before doing the copy picture.
This bit of code will group all the charts on the activesheet and then 
copy the picture. You will need to modify if you have more than one set 
of charts.

ActiveSheet.ChartObjects.Group
ActiveSheet.Shapes(1).CopyPicture
ActiveSheet.Shapes(1).Ungroup

By the way, do you really need to overlay your charts?

Cheers
Andy

SiriS < wrote:

> Hello,
> I have two graphs, one on top of the other, that I would like to copy
> into a Word document just like they look in Excel.
> 
> I can copy each of the graphs separetly into Word, using the following
> VBA code
> 
> ' Copy chart as a picture
> Activechart.Chart.CopyPicture _
> Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
> 
> ' Paste chart at cursor position
> With wordApp
> Selection.PasteSpecial Link:=False,
> DataType:=wdPasteMetafilePicture, _
> Placement:=wdInLine, DisplayAsIcon:=False
> End With
> 
> But how to copy the two of them together just like they look in the
> excel sheet? Any suggestions?
> 
> Thank you,
> Siri
> 
>           Attachment filename: two aligned graphs.xls           
> Download attachment: http://www.excelforum.com/attachment.php?postid=564746
> ---
> Message posted from http://www.ExcelForum.com/
> 

-- 

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
0
andy9699 (3616)
6/3/2004 8:53:04 AM
Yes, this works! Thank you Andy Pope!!

I would really like to make just one chart of it, but I have no
managed. The problem is I need the secondary y axis to create th
vertical line, and I need another - a third ;o)  - secondary y axis t
create the normal curve. I create the vertical line using Jon Peltier
excellent tip available a
http://peltiertech.com/Excel/Charts/AddLineVertSeries.html, but mayb
there are other ways of creating vertical lines, not using th
secondary axis?

But now that this works fine, I think I leave it like this for th
moment.

Thank you again!

Sir

--
Message posted from http://www.ExcelForum.com

0
6/3/2004 9:47:50 AM
Hi Siri -

Alternatively, you can copy a subset of the charts on the sheet:

   activesheet.shapes.range(array("Chart 2","Chart 3")).select

and your paste in Word is fine.

Couldn't you use the secondary axes for both the lines and the normal 
curve? What are the chart types for all of your series?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

SiriS < wrote:

> Yes, this works! Thank you Andy Pope!!
> 
> I would really like to make just one chart of it, but I have not
> managed. The problem is I need the secondary y axis to create the
> vertical line, and I need another - a third ;o)  - secondary y axis to
> create the normal curve. I create the vertical line using Jon Peltiers
> excellent tip available at
> http://peltiertech.com/Excel/Charts/AddLineVertSeries.html, but maybe
> there are other ways of creating vertical lines, not using the
> secondary axis?
> 
> But now that this works fine, I think I leave it like this for the
> moment.
> 
> Thank you again!
> 
> Siri
> 
> 
> ---
> Message posted from http://www.ExcelForum.com/
> 

0
DOjonNOT (619)
6/3/2004 10:44:34 PM
Hi Jon,
yes, of course I could use the same secondary axis for the vertica
line and the normal curve! I see it now! 

I have been so fixed with the fact that the second point for th
vertical line must have the same y value as maximum for the primary 
axis, but of course it can have the same y maximum as the normalcurve
Since the points for the vertical line are just "fake" points. 

Thank you!

Sir

--
Message posted from http://www.ExcelForum.com

0
6/4/2004 8:20:39 AM
Reply:

Similar Artilces:

Does Word have a command that compares to WordPerfect Advance?
I want to advance text to a specific position within the line that is independent of the number of characters that precedes it. Tab will not work as it measures from the preceding character. WordPerfect has a command: "Typesetting" "Advance" that I use for this. Is there a comparable command in MS Word? Word does have an Advance field, mostly for compatibility with documents imported from WordPerfect. If you use the \x switch, it will position the next character at the specified location. According to the help topic on the Advance field, the \x switch &qu...

Copying data from one chart to another
I have many graphs - all plotting on similar scales but using different data. Is there any way I can simply copy one set of data from one graph and paste it into another graph so that I can avoind going through all the hassle plotting each curve again? I want to have graphs showing different combinations of the same data and have hundreds of curves to plot so this could be a huge timesaver... Cheers. -- Alan_Partridge ------------------------------------------------------------------------ Alan_Partridge's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29295 V...

reserved words
why can reserved words be used in a table in excel and not in acess? am using 2007, tested importing a csv file from paypal to acess and protested at the field names. fianlly can anyone recommend tutorials on youtube as comprehensive as excel is fun? thanks for the trouble. ged. On Thu, 26 Nov 2009 15:00:01 -0800, stressed windows user <stressedwindowsuser@discussions.microsoft.com> wrote: >why can reserved words be used in a table in excel and not in acess? am using >2007, tested importing a csv file from paypal to acess and protested at the >field names. fi...

What is 'Align Text to Base Line Guide'?
Trying to make sure all lines have the same amount of space between them I selected paragraph from the format menu and under the line adjustments there is a box 'align text to base line guides' Ok I did that, now there are lines at the margines of my newsletter. What are these? Also selecting this pushed my text down from the top edge of the text box. What is this? The baseline guide measurements are in the Arrange, Layout Guides, Baseline tab. There is help in the Help menu. -- Mary Sauer http://msauer.mvps.org/ "Go_Girl3647" <GoGirl3647@discussions.microsoft.com...

Word 2007: word count wrong?
Hello, I have an issue with some .doc files when opening in Word 2007. In some cases the word count in the status bar is different of the word count of the "Word Count"- window (CTRL+SHIFT+G) or the word count in Word 2003 Example file: http://go.microsoft.com/fwlink/?LinkId=79595 Word 2007 (status bar) show 61019 words Word 2007 (Word count window) show 61010 words Word 2003 also show 61010 words This issue I have not with all documents, but only with some files and it seems that I have this problem only with .doc files but not with .docx files. (installed ve...

copy-paste from excel to powerpoint
Office 97 When I copy a number of cells from Excel to powerpoint, I can't get rid of the grid lines. There are no borders. When I'm in Excel, I see the faint grid lines as you normally would. Unfortunately, these lines also display in powerpoint. How do I stop that behaviour. Thanks so much for any help. Diana Select all the cells you are copying. Then: Format > Cells... > Patterns Then select white color ( bottom right) When the backgound color is set the gridlines vanish unless borders are turned on -- Gary''s Student "Cowtoon" wrote: > Off...

Excel 2003 Copy/Paste filtered column
I have a filtered column on my spreadsheet. I have copied the column, changed the figures and then tried to paste it back on to the filtered column. It is not copying over the original filtered column but rather over cells that have been filtered out. The worksheet/cells are not protected. What could the problem be? Kind Regards Heather That's the way pasting works. It'll hit the visible and hidden cells. Heather wrote: > > I have a filtered column on my spreadsheet. I have copied the column, > changed the figures and then tried to paste it back on to the filter...

After 12.2.4 update, cannot open some Word docs with Open passwords
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel After installing the 12.2.4 Office update, I am unable to open some Word files that I had password-protected with an Open File password. How can I open? Thanks Basically, "you can't". Sorry, the other passwords are crackable, but "Password to Open" is effectively the encryption key. The entire file is encrypted, and unless you have the correct password, you can't get it open. However, are you sure you are not attempting to open files that were password-=protected on the PC? ...

Word 2008 keeps crashing
I recently purchased a Macbook Pro and installed Office 2008. Whenever I type in Word or copy/paste from another document, I either get an error that says "Insufficient memory" or the application freezes and will not respond. Is there something I can do or just have to wait for an update? > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3285228210_9363962 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit On 2/7/08 10:37 AM, in article ee8c846.-1@web...

Same Table cannot be the child table in two nexted relations...
I've been setting up a schema with the XML Designer in VS .NET 2003. The designer lets me set up a lot of things including a complex type that contains an unnamed complex type called modified. When I try to preview the dataset, I get an error described as "The same table (modified) cannot be the child table in two nested relations. I've run into this before with a different complex type, and I've changed the name of the instance of the type in the various elements it's used, and the problem goes away. In this case, problem is an unnamed complex type, so it only a...

Copy Matrix Items
I am afraid I know the answer to this already but here goes- I have a prospective shoe store customer who receives as many as 500 pairs of shoes in a lot. Most of the time 50% or more of these shoes have not been stocked before and they don't know what the shoes will be until they get the lot. Because of the nature of shoes they need the ability to quickly enter in the assorted sizes and colors in a run of Men's, Women's, Children's etc. While the New Item Wizard for a Matrix Item works well the customer would like to not have to enter in the size runs each time since they a...

How to copy aQuery to a new Table?
I have a database in a Table, a report based on that same Table and a Query based on that Report. After two months or so I like, after some new data input, to save the Table into a new Object Table. What is the best way for the Report and Query to follow the new Table whitout recreating the original Report & Query? Thankyou for your comments. I use MS Office Access 2007. Joe T >>I have a database in a Table, a report based on that same Table and a Query based on that Report. Your phrasing is wrong when it comes to the elements of an Access database. A dat...

Word 2007 Error message
Hello, I'm currently using Works Suite 2006. I am attempting to intall the Word 2007 upgrade to no avail as I receiving the following error message: SET-UP ERROR D:\wordR.ww\osetup.DLL digital signature does not validate or is not present I would appreciate any advice and/or suggestions so that I can install Word 2007. Ciao, Jerry Sorry Jerry but this is Microsoft Access forum. You need to post this question to a different group to find any useful help. "Jerry T" <Jerry T@discussions.microsoft.com> wrote in message news:B45E64C3-D080-405E-9159-CB3E7F73AFFC@micr...

Help-- Having trouble opening Word & Entourage
I have to keep restarting my computer to be able to open Word or Entourage. The icons just bounce a little but won't open. I was getting a request from Entourage to rebuild the database which I did about 6 or 7 times. I got another warning which I ignored. I am on a MacBook Pro (Intel based). I am using office 2004. My Entourage database is 3.2 gb. I ran Disk Utilities a couple of times. I also had a problem a couple of times with FileMaker Pro but not sure if related. Thanks Christina On 22/8/06 20:01, in article 1156273266.788654.318170@i42g2000cwa.googlegroups.com, "...

Copy/paste range of rows between 2 dates...
Hi! I have a sheet called data which act as a database. The column A has the dates. In order to create customized chart in a userform, for different range of data(i.e from column D, G and M...), I'd like to select a range of rows that are between 2 dates and create the charts accordingly. Or copy to range to another sheet and then create the charts. I am not so advanced in VBA and any help would be greatly appreciated. Thanks! Greg ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore! Free Excel Forum http://www.ozgrid.com/forum *** Hi ...

"Can't copy the items. You don't have permission ..."
I use OL 2003, latest service pack,etc. My PST file is about 1.2 GB and is Unicode-compatible. Lately Outlook shuts down suddenly without warning, and I have left checked the box to restart Outlook automatically. This is a big annoyance. However, in the last 2-3 days, I'm seeing a new kind of problem. I can't delete or move messages from mail folders. I get the message that is in the subject line, and the balance of this message is: ... to create an entry in this folder. Right-click the folder and then click Properties to check your permissions for the folder. See the folder o...

How do I create custom postcards in Word 2007?
I want to create my own postcards using the right size and type of paper for mailing. This depends entirely on your printer. Can it handle the heavy weight of card used in postcards, and can it handle the unusual size of a postcard? On Apr 18, 2:54=A0pm, Create Custom Postcards <Create Custom Postca...@discussions.microsoft.com> wrote: > I want to create my own postcards using the right size and type of paper = for > mailing. Perhaps the easiest way to start is to get some Avery (or similar) postcard stock, which will have two postcards per sheet. Then find the a...

Can I have spell check ignore errors and alert me to real words?
Instead of stopping on misspellings and skipping real words, is there a way to stop on correct spellings to find actual words in a bunch of gibberish? Sort of an "UNspell check". For example, pass over "JJKSXO" but show me "SPELL". No, there is no way of doing that regards, Peo Sjoblom "JenLynFish" wrote: > Instead of stopping on misspellings and skipping real words, is there a way > to stop on correct spellings to find actual words in a bunch of gibberish? > Sort of an "UNspell check". For example, pass over "JJKSX...

Volume License copy of Windows Server
Gurus, Is there anyway anymore to get a full Volume License copy of Windows Server (e.g., version 2008) which does NOT require Internet activation? -- Spin Start with Vista/Windows 2008, your options to activate are by Internet or Phone. I believe the command that kicks it off is: slui.exe 4 "Spin" <Spin@invalid.com> wrote in message news:84nk89Far1U1@mid.individual.net... > Gurus, > > Is there anyway anymore to get a full Volume License copy of Windows > Server (e.g., version 2008) which does NOT require Internet activation? > ...

[ANN] "Bend Word to your Will" -- April 2005 edition free download
Dear all, THIS ANNOUNCEMENT IS ABOUT A *NON-COMMERCIAL* RESOURCE BASED IN PART ON ACCUMULATED ADVICE FROM THIS NEWSGROUP The latest version of my notes on Word -- titled "Bend Word to Your Will" -- is now available for downloading from the Word MVPs' site, http://www.mvps.org/word/FAQs/WordMac/Bend/BendWord.htm WHAT IS "BEND WORD TO YOUR WILL"? "Bend Word to Your Will" is not a commercial product for sale -- it's free. It's a dictionary-style (mainly) set of notes on Word that I've been continually adding to and polishing for the past four year...

Copy of all in/out mail in another mailbox
My management in intrested to receive all the in/out mails of all the mailnboxes in another mail box to check what other emplyees are sending and receive. Is it possible in MS Exchange 2000 or 2003, if yes how? Yes, it's possible. See this: http://www.msexchange.org/tutorials/MF011.html -- Neil Hobson Exchange MVP For Exchange news, links and tips, check: http://www.msexchange.co.uk "Jaffar Ali Sayyed" <jaffar@maruetechnologies.com> wrote in message news:045f01c3c862$f2d436d0$a401280a@phx.gbl... > My management in intrested to receive all the in/out mails > o...

right aligned menus?
is there any way to use menus from resources in right justified order? we have a customer that might like a non-English menu. TY Open the .rc file in a Text Editor and Add MFT_RIGHTJUSTIFY to the menu item. "Donald Sorenson" <dony_s@excite.com> wrote in message news:OyeQn1TfEHA.3556@TK2MSFTNGP12.phx.gbl... > is there any way to use menus from resources in right justified order? we > have a customer that might like a non-English menu. > > TY > > TY! but I didn't find the right place in the script file... I tried to OR (|) it with the first M...

You cannot copy or move messages to public folders
I have a few users who get the following error when trying to move messages from their inbox into a public folder - "Can't move the items. You do not have sufficient permission to perform this operation on this object. See the folder contact or your system administrator" I have found the following on microsofts website and have made those changes but it has not solved the issue http://support.microsoft.com/?kbid=330752 has anyone seen this before? I have also downloaded outspy and run this on messages that have failed and on messages that are ok. However im not really su...

Prevent copy and paste in one column
I am having trouble trying to prevent copying and pasting in one specific column. The code refers to the specific range, but yet it prevents copying and pasting on the whole worksheet. Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Columns("H:H")) Is Nothing Then Application.CellDragAndDrop = False Application.CutCopyMode = False Else Application.CellDragAndDrop = True End If End Sub Works for me in Excel 2003 Gord Dibben MS Excel MVP On Fri, 30 Apr 2010 11:42:01...

Copying of non-consecutive, columnar data into consecutive-columnar cells
Hi: I have data located at a1:a9, then a:10 is blank; then, I have 9 more lines of data from a11:a19, and a20 is blank... a1, a11, a21...are all the texts/numbers that I want printed on a different page. But here's the catch: I'd like to print it at locations a1, a2, a3... Specifically, the data that I have appears like this on THIS IS ON SHEET 1: A1: prefix: Mr A2: emailAddress: john.smith@1.com A3: firstName: John A4: lastName: Smith A5: company: ABC Company A6: A7: prefix: Mrs A8: emailAddress: kim.davids@2.com A9: firstName: Kim A10: lastName: Davids A11: company: X...