Siddhartha
Siddhartha

Reputation: 147

How to format copied content from excel to PowerPoint? (Shape and Table Cell)

I have used VBA to copy values from Excel cells into table cells (tablename: "myTable", 2*2) and also into text for shapes (shape name "Oval11"). Now I want to format these as follows in PowerPoint using VBA from Excel:

How can this be done?

I am using Office 2010, but compatibility with Office 2007 will also be helpful.

Thanks for help.

Upvotes: 0

Views: 2046

Answers (1)

jmac
jmac

Reputation: 7128

Assuming your excel sheet is already formatted as you want it in the PowerPoint, when copying the contents of those cells use .Text instead of .Value.

See this question for more details on how it works.

If your excel sheet is not formatted properly, you can either create a string variable in vba from the value and format it within vba, or format it using the =TEXT() command in excel through VBA, and store the result as a string.

Upvotes: 0

Related Questions