PDA

View Full Version : Pasting Word Tables into PowerPoint



DEWunderlich
05-17-2008, 03:09 PM
:help Hello,

I am brand new to this forum and I am sure hoping someone can help me out. We have a program that generates dynamic Word documents that consist almost entirely of tables. Our users now want an option to convert these documents to PowerPoint Presentations. The way I am doing this is to copy from word and paste an Ole object into a shape on a PowerPoint Slide. It all seems to work fine except since the Word document is generated using an 11 pt font, that's the size we are getting pasted into PowerPoint and our users want a larger font. I have tried everything I can think of and can't seem to get anything to work. I either end up losing data (I am copying more than what will fit into the shape, or the tables extend too far to the right and things get chopped off.

Does anyone have any suggestions for doing this? I can give you code samples if that would help.

wrecks
09-28-2008, 05:43 AM
Try something like this:

table.AutoFitBehavior=wdAutoFitContent
table.Range.Font.Size=14
table.Save

However, if you want the table to fit on the slide, that's a tough one! I wrote some code that starts with a large font size, determines if the table fits on the page, and iterates through smaller font sizes until it does. But it doesn't work reliably! Sigh.