If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Problems with PPT PageSetup during automation
Hi All,
I have an urgent problem with PPT 2003 which I was unable to solve since two days, so now I begin to think this is a bug, though I did not find any confirmation for this. My problem is, that as a user, whenever I open a ppt and change (decrease) the width and height of the page in the File/Page Setup dialog the slides including shapes, images and fonts scale correctly. But when I do same thing via automation (VB. NET 2005 express editin) most of the fonts (but not all) scale incorrectly (are too large). Other objects scale correctly. This happens on slides where there are text in text boxes with different styles (bold, normal, italic) and different sizes. Here's the code: Dim pptPage As PowerPoint.PageSetup pptPage = ppDestApp.ActivePresentation.PageSetup With pptPage oHeight = .SlideHeight oWidth = .SlideWidth .SlideWidth = 480 .SlideHeight = 360 End With pptPage = Nothing Note, I have a Hungarian Office which prompts page demension in centimeters if this matters anything and I am on win XP sp2 with latest service packs and updates. Please help me, Marton Bokor |
#2
|
|||
|
|||
Problems with PPT PageSetup during automation
In article , Bitula wrote:
Hi All, I have an urgent problem with PPT 2003 which I was unable to solve since two days, so now I begin to think this is a bug, though I did not find any confirmation for this. I'd say it is a bug. In my experience, changing the page size will not change the size of text in text boxes and/or placeholders, so you may need to write add'l code to reduce the font size, shape size by the same ratio as you've reduced the page size, and possibly change the positions of the shapes accordingly. My problem is, that as a user, whenever I open a ppt and change (decrease) the width and height of the page in the File/Page Setup dialog the slides including shapes, images and fonts scale correctly. But when I do same thing via automation (VB. NET 2005 express editin) most of the fonts (but not all) scale incorrectly (are too large). Other objects scale correctly. This happens on slides where there are text in text boxes with different styles (bold, normal, italic) and different sizes. Here's the code: Dim pptPage As PowerPoint.PageSetup pptPage = ppDestApp.ActivePresentation.PageSetup With pptPage oHeight = .SlideHeight oWidth = .SlideWidth .SlideWidth = 480 .SlideHeight = 360 End With pptPage = Nothing Note, I have a Hungarian Office which prompts page demension in centimeters if this matters anything and I am on win XP sp2 with latest service packs and updates. Please help me, Marton Bokor ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#3
|
|||
|
|||
Problems with PPT PageSetup during automation
Marton,
Are you sure you aren't changing the aspect ratio of the page? Brian Reilly, MVP On Fri, 23 Nov 2007 01:56:02 -0800, Bitula wrote: Hi All, I have an urgent problem with PPT 2003 which I was unable to solve since two days, so now I begin to think this is a bug, though I did not find any confirmation for this. My problem is, that as a user, whenever I open a ppt and change (decrease) the width and height of the page in the File/Page Setup dialog the slides including shapes, images and fonts scale correctly. But when I do same thing via automation (VB. NET 2005 express editin) most of the fonts (but not all) scale incorrectly (are too large). Other objects scale correctly. This happens on slides where there are text in text boxes with different styles (bold, normal, italic) and different sizes. Here's the code: Dim pptPage As PowerPoint.PageSetup pptPage = ppDestApp.ActivePresentation.PageSetup With pptPage oHeight = .SlideHeight oWidth = .SlideWidth .SlideWidth = 480 .SlideHeight = 360 End With pptPage = Nothing Note, I have a Hungarian Office which prompts page demension in centimeters if this matters anything and I am on win XP sp2 with latest service packs and updates. Please help me, Marton Bokor |
#4
|
|||
|
|||
Problems with PPT PageSetup during automation
Thanks for the Info,
Note, not all of the fonts are not resized correctly, strangely some get resized correctly. Do you happen to know whether this is fixed in office 2007? Brian, I use slideHeight/slideWeight pixel based poperties exposed through the interop interface as indicated in the pasted code below. I found no other properties for manipulating the size of the page (slides) in the PageSetup object. If there is any other way to resize the slides without having to resize the fonts separately please feel free to suggest. Best Regards, Marton "Steve Rindsberg" wrote: In article , Bitula wrote: Hi All, I have an urgent problem with PPT 2003 which I was unable to solve since two days, so now I begin to think this is a bug, though I did not find any confirmation for this. I'd say it is a bug. In my experience, changing the page size will not change the size of text in text boxes and/or placeholders, so you may need to write add'l code to reduce the font size, shape size by the same ratio as you've reduced the page size, and possibly change the positions of the shapes accordingly. My problem is, that as a user, whenever I open a ppt and change (decrease) the width and height of the page in the File/Page Setup dialog the slides including shapes, images and fonts scale correctly. But when I do same thing via automation (VB. NET 2005 express editin) most of the fonts (but not all) scale incorrectly (are too large). Other objects scale correctly. This happens on slides where there are text in text boxes with different styles (bold, normal, italic) and different sizes. Here's the code: Dim pptPage As PowerPoint.PageSetup pptPage = ppDestApp.ActivePresentation.PageSetup With pptPage oHeight = .SlideHeight oWidth = .SlideWidth .SlideWidth = 480 .SlideHeight = 360 End With pptPage = Nothing Note, I have a Hungarian Office which prompts page demension in centimeters if this matters anything and I am on win XP sp2 with latest service packs and updates. Please help me, Marton Bokor ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#5
|
|||
|
|||
Problems with PPT PageSetup during automation
I use slideHeight/slideWeight pixel based poperties exposed through the
interop interface as indicated in the pasted code below. I found no other properties for manipulating the size of the page (slides) in the PageSetup object. If there is any other way to resize the slides without having to resize the fonts separately please feel free to suggest. Marton "Brian Reilly, MVP" wrote: Marton, Are you sure you aren't changing the aspect ratio of the page? Brian Reilly, MVP On Fri, 23 Nov 2007 01:56:02 -0800, Bitula wrote: Hi All, I have an urgent problem with PPT 2003 which I was unable to solve since two days, so now I begin to think this is a bug, though I did not find any confirmation for this. My problem is, that as a user, whenever I open a ppt and change (decrease) the width and height of the page in the File/Page Setup dialog the slides including shapes, images and fonts scale correctly. But when I do same thing via automation (VB. NET 2005 express editin) most of the fonts (but not all) scale incorrectly (are too large). Other objects scale correctly. This happens on slides where there are text in text boxes with different styles (bold, normal, italic) and different sizes. Here's the code: Dim pptPage As PowerPoint.PageSetup pptPage = ppDestApp.ActivePresentation.PageSetup With pptPage oHeight = .SlideHeight oWidth = .SlideWidth .SlideWidth = 480 .SlideHeight = 360 End With pptPage = Nothing Note, I have a Hungarian Office which prompts page demension in centimeters if this matters anything and I am on win XP sp2 with latest service packs and updates. Please help me, Marton Bokor |
#6
|
|||
|
|||
Problems with PPT PageSetup during automation
In article , Bitula wrote:
Thanks for the Info, Note, not all of the fonts are not resized correctly, strangely some get resized correctly. Do you happen to know whether this is fixed in office 2007? No, afraid not. In fact, it seems to get worse. The size and position of rectangles and similar shapes is adjusted but the outline is not, so when you make the slide smaller, the outlines appear to get much bigger. I use slideHeight/slideWeight pixel based poperties Points, actually, not pixels. 72 points to the inch. exposed through the interop interface as indicated in the pasted code below. I found no other properties for manipulating the size of the page (slides) in the PageSetup object. If there is any other way to resize the slides without having to resize the fonts separately please feel free to suggest. None that I know of, other than (do you have a strong stomach and nerves of steel?) sending keystrokes to the dialog box. Ugly. Best Regards, Marton "Steve Rindsberg" wrote: In article , Bitula wrote: Hi All, I have an urgent problem with PPT 2003 which I was unable to solve since two days, so now I begin to think this is a bug, though I did not find any confirmation for this. I'd say it is a bug. In my experience, changing the page size will not change the size of text in text boxes and/or placeholders, so you may need to write add'l code to reduce the font size, shape size by the same ratio as you've reduced the page size, and possibly change the positions of the shapes accordingly. My problem is, that as a user, whenever I open a ppt and change (decrease) the width and height of the page in the File/Page Setup dialog the slides including shapes, images and fonts scale correctly. But when I do same thing via automation (VB. NET 2005 express editin) most of the fonts (but not all) scale incorrectly (are too large). Other objects scale correctly. This happens on slides where there are text in text boxes with different styles (bold, normal, italic) and different sizes. Here's the code: Dim pptPage As PowerPoint.PageSetup pptPage = ppDestApp.ActivePresentation.PageSetup With pptPage oHeight = .SlideHeight oWidth = .SlideWidth .SlideWidth = 480 .SlideHeight = 360 End With pptPage = Nothing Note, I have a Hungarian Office which prompts page demension in centimeters if this matters anything and I am on win XP sp2 with latest service packs and updates. Please help me, Marton Bokor ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#7
|
|||
|
|||
Problems with PPT PageSetup during automation
Thanks for the info,
I've spent almost 3 days resizing all fonts (I think you were right, none of the fonts were resized). I also had to resize frame margings, paragraph line spacing and other stuff like things on master slides. Now I have a quite nice output, but it was very unfortunate that all this work had to be done because of a bug. "Steve Rindsberg" wrote: In article , Bitula wrote: Thanks for the Info, Note, not all of the fonts are not resized correctly, strangely some get resized correctly. Do you happen to know whether this is fixed in office 2007? No, afraid not. In fact, it seems to get worse. The size and position of rectangles and similar shapes is adjusted but the outline is not, so when you make the slide smaller, the outlines appear to get much bigger. I use slideHeight/slideWeight pixel based poperties Points, actually, not pixels. 72 points to the inch. exposed through the interop interface as indicated in the pasted code below. I found no other properties for manipulating the size of the page (slides) in the PageSetup object. If there is any other way to resize the slides without having to resize the fonts separately please feel free to suggest. None that I know of, other than (do you have a strong stomach and nerves of steel?) sending keystrokes to the dialog box. Ugly. Best Regards, Marton "Steve Rindsberg" wrote: In article , Bitula wrote: Hi All, I have an urgent problem with PPT 2003 which I was unable to solve since two days, so now I begin to think this is a bug, though I did not find any confirmation for this. I'd say it is a bug. In my experience, changing the page size will not change the size of text in text boxes and/or placeholders, so you may need to write add'l code to reduce the font size, shape size by the same ratio as you've reduced the page size, and possibly change the positions of the shapes accordingly. My problem is, that as a user, whenever I open a ppt and change (decrease) the width and height of the page in the File/Page Setup dialog the slides including shapes, images and fonts scale correctly. But when I do same thing via automation (VB. NET 2005 express editin) most of the fonts (but not all) scale incorrectly (are too large). Other objects scale correctly. This happens on slides where there are text in text boxes with different styles (bold, normal, italic) and different sizes. Here's the code: Dim pptPage As PowerPoint.PageSetup pptPage = ppDestApp.ActivePresentation.PageSetup With pptPage oHeight = .SlideHeight oWidth = .SlideWidth .SlideWidth = 480 .SlideHeight = 360 End With pptPage = Nothing Note, I have a Hungarian Office which prompts page demension in centimeters if this matters anything and I am on win XP sp2 with latest service packs and updates. Please help me, Marton Bokor ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
Thread Tools | |
Display Modes | |
|
|