Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>My sample application begins with creating an instance of a <code>PowerPoint.Application</code> class;</p> <p><code>PowerPoint.Application PowerPointApplication = new PowerPoint.Application();</code></p> <p>Then I set <code>Visible</code> property to <code>msoTrue</code>;</p> <pre><code>PowerPointApplication.Visible = Core.MsoTriState.msoTrue; </code></pre> <p>Then create a <code>Presentation</code> and <code>Slide</code>;</p> <pre><code>PowerPoint.Presentations PowerPointPresentationSet = PowerPointApplication.Presentations; PowerPoint._Presentation PowerPointPresentation = PowerPointPresentationSet.Add(); PowerPoint.Slides PowerPointSlideSet = PowerPointPresentation.Slides; PowerPoint._Slide PowerPointSlide = PowerPointSlideSet.Add(1, PowerPoint.PpSlideLayout.ppLayoutBlank); </code></pre> <p>In my code, I created a <code>Shape</code> object;</p> <pre><code>PowerPoint.Shape PowerPointShape = PowerPointSlide.Shapes.AddLine(100, 100, 500, 500); </code></pre> <p>Then, I format it like this;</p> <pre><code>PowerPointShape.Line.Weight = 10; PowerPointShape.Line.ForeColor.RGB = 65535; PowerPointShape.Line.Transparency = 0.8f; </code></pre> <p>The point is, <code>Opacity</code> grows when <code>Transparency</code> property decreases.</p> <p>You can set <code>Line.Weight</code> property to <em>thinner</em> or <em>ticker</em> the line, and you can set the value of <code>Foreground.RGB</code> property to change the color of line.</p> <p>PS: I added these <em>namespaces</em> code files <em>usings</em> area;</p> <pre><code>using PowerPoint = Microsoft.Office.Interop.PowerPoint; using Core = Microsoft.Office.Core; </code></pre> <p>You can find working solution from this link; <a href="http://snipt.org/nsgk7" rel="nofollow">http://snipt.org/nsgk7</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload