Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.powerpoint
|
|||
|
|||
Excel to Powerpoint 2003 Chart Width
Hello All...
I built a tool designed to push All or Selected Charts and ChartObjects directly to PowerPoint. The code below is for ChartObjects and works great (charts are properly formatted within the slide) in 2007 (Office12) but not in 2003. In 2003, the width of the chart extends off the right slide of the slide. I added the debug lines and modified the Width calc but in each case the width value is off the slide - which is strange because the math is straightforward. I recall some info about 2003 to 2007 Ppt changes but have not been able to track them down. Thanks for any help... -Robert For Each chtobj In Sheets(n).ChartObjects sld_count = sld_count + 1 chtobj.Copy Set PPSlide = ppPres.Slides.Add(Index:=ppPres.Slides.Count + 1, Layout:=ppLayoutBlank) PPSlide.Select '// Paste the chart/shape PPSlide.Shapes.Paste Set shp = PPSlide.Shapes(1) With ppPres.PageSetup shp.Left = frmPpt.TextBox1.Value * 75 shp.Top = shp.Left '// SlideWidth does not calc as expected shp.Width = .SlideWidth - (shp.Left * 2) shp.Height = .SlideHeight - (shp.Top * 2) Debug.Print "left: " & shp.Left Debug.Print "top: " & shp.Top Debug.Print "width: " & shp.Width Debug.Print "height: " & shp.Height Debug.Print "--------" End With '// Add TextBoxes AddTextbox Next |
#2
Posted to microsoft.public.excel.programming,microsoft.public.powerpoint
|
|||
|
|||
Excel to Powerpoint 2003 Chart Width
Does setting
shp.LockAspectRatio=msoFalse before you set the width help? -- john ATSIGN PPTAlchemy.co.uk Free PPT Hints, Tips and Tutorials http://www.pptalchemy.co.uk/powerpoi...tutorials.html PPTLive Atlanta Oct 11-14 2009 "Robert" wrote: Hello All... I built a tool designed to push All or Selected Charts and ChartObjects directly to PowerPoint. The code below is for ChartObjects and works great (charts are properly formatted within the slide) in 2007 (Office12) but not in 2003. In 2003, the width of the chart extends off the right slide of the slide. I added the debug lines and modified the Width calc but in each case the width value is off the slide - which is strange because the math is straightforward. I recall some info about 2003 to 2007 Ppt changes but have not been able to track them down. Thanks for any help... -Robert For Each chtobj In Sheets(n).ChartObjects sld_count = sld_count + 1 chtobj.Copy Set PPSlide = ppPres.Slides.Add(Index:=ppPres.Slides.Count + 1, Layout:=ppLayoutBlank) PPSlide.Select '// Paste the chart/shape PPSlide.Shapes.Paste Set shp = PPSlide.Shapes(1) With ppPres.PageSetup shp.Left = frmPpt.TextBox1.Value * 75 shp.Top = shp.Left '// SlideWidth does not calc as expected shp.Width = .SlideWidth - (shp.Left * 2) shp.Height = .SlideHeight - (shp.Top * 2) Debug.Print "left: " & shp.Left Debug.Print "top: " & shp.Top Debug.Print "width: " & shp.Width Debug.Print "height: " & shp.Height Debug.Print "--------" End With '// Add TextBoxes AddTextbox Next |
#3
Posted to microsoft.public.excel.programming,microsoft.public.powerpoint
|
|||
|
|||
Excel to Powerpoint 2003 Chart Width
Setting shp.LockAspectRatio=msoFalse did the job. Looks like the
default setting may be different between 2003 and 2007. Thanks very much! -Robert On Aug 7, 1:19*pm, John Wilson <john AT technologytrish.co DOT uk wrote: Does setting shp.LockAspectRatio=msoFalse before you set the width help? -- john ATSIGN PPTAlchemy.co.uk Free PPT Hints, Tips and Tutorialshttp://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html PPTLive Atlanta Oct 11-14 2009 "Robert" wrote: Hello All... I built a tool designed to push All or Selected Charts and ChartObjects directly to PowerPoint. The code below is for ChartObjects and works great (charts are properly formatted within the slide) in 2007 (Office12) but not in 2003. In 2003, the width of the chart extends off the right slide of the slide. I added the debug lines and modified the Width calc but in each case the width value is off the slide - which is strange because the math is straightforward. I recall some info about 2003 to 2007 Ppt changes but have not been able to track them down. Thanks for any help... -Robert For Each chtobj In Sheets(n).ChartObjects * * sld_count = sld_count + 1 * * chtobj.Copy * * Set PPSlide = ppPres.Slides.Add(Index:=ppPres.Slides.Count + 1, Layout:=ppLayoutBlank) * * PPSlide.Select * * '// Paste the chart/shape * * PPSlide.Shapes.Paste * * Set shp = PPSlide.Shapes(1) * * With ppPres.PageSetup * * * * shp.Left = frmPpt.TextBox1.Value * 75 * * * * shp.Top = shp.Left * * * * '// SlideWidth does not calc as expected * * * * shp.Width = .SlideWidth - (shp.Left * 2) * * * * shp.Height = .SlideHeight - (shp.Top * 2) * * * * Debug.Print "left: " & shp.Left * * * * Debug.Print "top: " & shp.Top * * * * Debug.Print "width: " & shp.Width * * * * Debug.Print "height: " & shp.Height * * * * Debug.Print "--------" * * End With * * '// Add TextBoxes * * AddTextbox Next- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extracting chart title from Embedded Excel Chart in PowerPoint | Excel Programming | |||
ASC() does not convert full-width to half-width letters (Exel 2003 | Excel Worksheet Functions | |||
excel chart to powerpoint | Excel Programming | |||
increase column width in PowerPoint chart | Excel Discussion (Misc queries) | |||
Excel chart in Powerpoint | Charts and Charting in Excel |