VBA To Change Position Of Images In PowerPoint

Feb 20, 2014

I have written a macro to export many bmp image files to different PPT slides. Everything works fine, but for few slides I am not able to change the co-ordinates. I am using the below code to position the image files. But no matter how much I change the values, the images sits in the same place. And I dont get any error.

PPSlide.Shapes.AddPicture Filename:=slide4pic2, LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=475, Top:=240, Width:=245, Height:=100
PPSlide.Shapes.AddPicture Filename:=slide4pic3, LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=475, Top:=340, Width:=245, Height:=100
PPSlide.Shapes.AddPicture Filename:=slide4pic4, LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, _
Left:=475, Top:=440, Width:=245, Height:=100

View 1 Replies


ADVERTISEMENT

Picture Name & Position Of Images In Worksheet

Mar 1, 2008

Using excel and Crystal Ball I generated a workbook that calculates via VBA Value at Risk and diverse financial charts and ratios.

I have a second workbook, the template, where this values are pasted generating a report.

Up to this point the macro works correctly, the problem is that some of the Crystal Ball charts are pasted as images and I dont know how to "handle" this images.

I reached the point where I can paste the image in the template.

I want the macro to:

1) Detect the images in the template worksheet
2) Determine a position and size for each image

View 4 Replies View Related

How To Change PowerPoint Textbox Line Color Using Excel VBA

Mar 7, 2014

I've created a powerpoint with a number of slides, and I need to put a textbox at the bottom. I want to change the colour of the textbox border colour.

Code:
For intCount = 1 To 5
Set tmpTxtBox = pptApp.ActivePresentation.Slides(intCount).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=120, Top:=500, Width:=500, Height:=100).TextFrame.TextRange
tmpTxtBox.Text = strTolerance
tmpTxtBox.Font.Name = "Arial"
tmpTxtBox.Font.Size = 12
tmpTxtBox.Font.Size = 12
tmpTxtBox.ParagraphFormat.Alignment = ppAlignCenter
' ??? tmpTxtBox.Line.ForeColor = RGB(255, 0, 0)
Next intCount

I've tried everything I can think of for that line with the ??? in, .line.color, .color, .bordercolor but Excel VBA doesn't like any of them , I get error 438 'object doesn't support this property or method'.

View 2 Replies View Related

Link And Change Source For Multiple Tabs From Excel To PowerPoint

Jan 18, 2012

I have to prepare a monthly presentation for my company. I have all financial data in multiple tabs in excel that have been linked to many powerpoint slides.

The problem is, I update the same excel sheet every month and save it with a different name. How can I change the source in powerpoint to select and update all the slides with all the corresponding tabs.

At present, I use Edit link (ALT+E+K) > Select each slide on the powerpoint> Change source to new excelfile. When I select all the sheets, the "change source" greys out. Hence I have to do it individually.

View 2 Replies View Related

Change Order Of Graphs When Using Macro To Export All Excel Charts To Powerpoint?

Apr 14, 2014

I've been using a VBA code to look through my spreadsheet and find any graphs in any tab and move it to powerpoint. I have about 70 tabs with 7 graphs each.

I have is that the order of the graphs in the slidepack isn't in the same as found on each excel tab.I also tried renaming them (chart1-chart7) but problem still remains.

View 3 Replies View Related

VBA - Loop Through All Images On Sheet Change Properties

Jun 18, 2013

I need some code that will loop through all the images on a spreadsheet, and change the properties so the images will "Move and Size with Cells"

View 2 Replies View Related

Change Position Of Where Subtotals Are Placed?

Dec 31, 2013

Formula/code to change the position of where the subtotals are placed. I don't want them appearing at the beginning or end of the data set but in a separate column beside each data set. how to access the code so I can try and alter it myself.

View 14 Replies View Related

Change Position Of X & Y Axis?

Nov 1, 2006

I have a large database with names down the left and numbers across the top. I want to "tilt" the entire table so that the names run across the top and the numbers run down the left side while keeping all the data together.

Example:
from this:

a b c d e f
1
2
3
4
5

to this:

1 2 3 4 5
a
b
c
d
e
f

View 3 Replies View Related

Change Chart Position

Nov 6, 2006

I have a chart that needs to be positioned at the bottom of a table of data. (The table of data is created by some VBA which extracts data from another sheet based on user input). The chart is a pivot chart built on a pivot table from another worksheet. I've read the suggestion that the chart should be positioned above the table of data which I would do, however as there is already a series of tables and charts above, it would be too confusing for the user to see the chart out of sequence.

As I already have a fair bit of VBA to generate my existing sheet, I’d like to have something very simple that I can insert in various places depending when the user makes a change, which requires the chart to be repositioned. Something like:

Change chart position To Range ("B65536").End(xlUp).Row

View 2 Replies View Related

Change Shape Size / Keep Its Position?

Jul 10, 2014

I have an autoshape on an sheet, and use this code (it's a circle), to rezise it....

[Code] ....

However, it does rezise it, but the shape doesn't keep it's central position. Is there a bit of code I can add to stop the shape from moving? In other words, have the shape rezise around it's center of location?

View 4 Replies View Related

Force Textbox Vertical Scroll Position To Top After Value Change

May 13, 2009

When a userform textbox value is changed, if the vertical scrollbars were shown previously (due to more text than displayed size) and is still required for new value, how do you reset the scrollbar/textbox value back to the top (if it was previously scrolled down by the user). If teh scrool bar is no longer required for new value (due to sufficient space to display new value without scrollbars), how do you remove/hide the scrollbar again until needed.

View 2 Replies View Related

Change Characters In Specific Position Of A Text File

Aug 6, 2008

I have a very large file of data, over 500,000 rows, opening in one sheet in Excel is not an option with my current version. In each row I need to change the characters in positions 41-44 from whatever they current are, to '9999'. I'm sure there has to be a way I can do this using vba, does anyone have a sample snippet of code, or another post they can point me too?

View 9 Replies View Related

Change Cell Comment Default Show Position

Feb 3, 2008

It seems that you can change position when you editing comment and its remembered, but when its showing its alway's on default position.

Is there way to change position of displayed (when you mouse over cell and coment pops up) comment position?

View 3 Replies View Related

Macro To Create Worksheet, Change It's Position, And Paste Date Into It

Apr 26, 2009

I need a macro that will create a new blank worksheet, move it to the last spot and paste the entire contents of the sheet named "master" into the newly created sheet.
I have tried to do this with the recorder but have been unable to get it to work.

View 9 Replies View Related

Position Cell In Top Left Position

Jan 7, 2009

Is it possible to position a predetermined cell (e.g. A42) in the top left corner of the screen. (Not every screen users use has the same size)

View 3 Replies View Related

Code Change To Refer To Column Name Rather Than Column Position

Jun 24, 2009

I have this code below that deletes any single occurrence of a customer number but the "Customer Numbers" must be in column A.

I would like to change the code below to instead look for the "Customer Number" column by name, rather than by column A. My "Customer Number" column will always be in row 1, but yet, it will be in a different column letter every time I run the report.

View 2 Replies View Related

How To Put Chart In PowerPoint

Mar 28, 2014

I am looking to put a chart in PowerPoint and source Data in to PowerPoint. So all I have to do is to update in PowerPoint. Is there a way to do it?

View 1 Replies View Related

Charts To PowerPoint

Jun 9, 2005

I need to export serveral charts to several slides within PowerPoint from Excel Using VBA. I use 2002 versions. I added chartobjects (2) under 1 but not sure if that is the correct placement to start adding more charts to slides.

Private Sub CommandButton1_Click()
'Sub PowerPointOLEAutomation()
Dim ppt As Object, pres As Object
'Create a Microsoft PowerPoint session
Set ppt = CreateObject("powerpoint.application")
'Copy the chart on the Chart Labels Demo sheet
Worksheets("sw dr").ChartObjects(1).Copy
'Worksheets("sw dr&ot").ChartObjects(2).Copy
'Create a new document in Microsoft PowerPoint
Set pres = ppt.Presentations.Add.........................

View 4 Replies View Related

Add Graphs From Workbooks To Powerpoint

Feb 21, 2014

So I have lets say 3 workbooks and on each first tab of that worbook there is a (pivot)graph. Now what I would want is VBA code which opens these excel workbooks, then copy the chart and paste it into a powerpoint presentation each chart on a new powerpoint slide. So it can be rather basic. A loop which goes thru excel sheets and always takes the chart on the first tab. I see a lot of different code but not what I really can use for powerpoint thru excel vba.

View 2 Replies View Related

Opening A Powerpoint File

Sep 22, 2008

I have some VBA code that allows the user to open a linked powerpoint presentation from an Excel workbook. It works well but it does not ask the the user to update links so if the Excel book has changed the powerpoint stays the same. I am very new to VBA so I tend to copy things that work but don't always know why! Anyone out there know how to get it to update links automatically or at least ask the user to do so? Here is the code:

View 2 Replies View Related

Find And Replace In PowerPoint

Jun 10, 2011

I need to do a find and replace in PowerPoint but using Excel VBA.

View 5 Replies View Related

Excel VBA - Go To Certain Slide In PowerPoint?

Dec 2, 2011

Code to go to a certain slide in Powerpoint. I kept trying to run the code in Excel VBA and it never worked.

So I said "why not try this code in Powerpoint to see if it works?' and, low and behold, it worked!

What I need is to get the code below, which works in Powerpoint VBA, to work in Excel VBA.

Code:
Sub gothere()
On Error Resume Next
ActivePresentation.SlideShowWindow.View.GotoSlide 3
If Err 0 Then ActiveWindow.View.GotoSlide 3
End Sub

View 3 Replies View Related

Excel To PowerPoint Without Embedding?

Sep 28, 2012

I have a monthly task where I collect raw data, and make up various charts in PowerPoint.

I have been making the charts in PowerPoint as previously, the file size of the .ppt was too large as it was embedding the Excel sheets into the PowerPoint. Is there any way I can set up sheets in Excel so that I can update them every month and then run a macro so that it updates the graphs automatically (without the embedding)?

I think copying them over as a JPG might work but is there any other way? I have no idea about the code needed, and I'm using Office 2003.

View 3 Replies View Related

Data From PowerPoint To Excel

Jun 5, 2013

The problem I am having is that the data I am transferring is going to top of column cell first and then when I run the macro again it skips down to the next empty cell in the column...what I want it to do is paste the data into the next empty cell...

Here is the code I am using
Code:
Private Sub CommandButton1_Click()
Dim oExcel As Excel.Application
Dim oWB As Excel.Workbook
Dim oWS As Excel.Worksheet
Set oExcel = New Excel.Application
oExcel.Visible = True '

View 1 Replies View Related

Selected Charts To Powerpoint

Feb 20, 2007

I am trying to export charts to powerpoint. I have a sheet where the user gives the list of excel files and sheet names (charts as sheet) to be imported. I run a loop to create this... but then i get a script out of range error.

Sub Chart2PPT()
Dim objPPT As Object
Dim objPrs As Object
Dim shtTemp As Worksheet
Dim chtTemp As Chart
Dim intSlide As Integer
Dim FSO As Object
Dim FromPath As String
Dim ToPath As String
Set FSO = New FileSystemObject
If FSO.FileExists("\server4meme.ppt") Then
Kill ("\server4meme.ppt")
End If
Set FSO = New FileSystemObject
If FSO.FileExists("\server4me ot.xls") Then
Kill ("\server4me ot.xls").........................

View 6 Replies View Related

Linking Graphs From Excel To PowerPoint (Only Once)

May 6, 2014

I have an excel that gets updated monthly for reporting. The goal is to get the graphs to update automatically by linking them from excel into power point. This is relatively easy but what when I go to update the report for the next month the data for the old power point changes as well. Is there a way to prevent this?

View 1 Replies View Related

Linking To Specific PowerPoint Slide

Jan 17, 2014

I have a table in excel where I'm trying to hyperlink to specific side in a powerpoint presentation. I've found various sites instructing me to use #slidenumber (eg #4) at the end of the filename when editing the link, however many different combinations of slide numbers and names i use it refuses to open the deck at that set slide, always taking me to the beginning. I've tried using the bookmark option in excel but that gives a error messaging stating bookmarks cannot be used in xml files.

View 1 Replies View Related

Code To Import Charts Into Powerpoint

May 12, 2009

I don't know if this is possible, but is there a way to have a macro in Excel copy and paste charts into a Powerpoint file? I've got a program that creates all the material needed for a Powerpoint slide deck and I want to automate the copy/paste work.

View 2 Replies View Related

Hiding Focus Of PowerPoint Export

Oct 15, 2009

I am exporting from Excel into PowerPoint, and I am afraid of having a seizure after watching the export too many times. What is the best way to hide this or keep the focus on Excel?

I have tried many methods but have failed thus far. I have a modeless userform that opens up when the macro begins, but it always changes focus to PowerPoint. I have ScreenUpdating set to False.

View 3 Replies View Related

Format Of PowerPoint Links To Excel

Sep 25, 2011

I have 3 potx files, for one of them the links come out as:

Site Safety Metrics Rollup.xlsm!PPT1!R101C2:R118C14

the other are like:

C:EHS ReportsTFP EHS ReportSite Safety Metrics Rollup.xlsm!PPT1!R192C2:R209C14

I want to have the same format as the first one i.e., without the path. When the potx files are refreshed the link file will always be opened, so i do not need the path (this is part of a vba program).

The folder containing the files will be sent around and put in different drives.

'EHS Reports' is the main folder and that and everything else inside will remain the same. But the ppt links will not change so obviously will not update when the 'EHS Reports' folder is somewhere else.

Why did the links show up in different formats?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved