You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting a hyperlink to filename an exception is thrown "Hyperlink is invalid.".
Powerpoint should be able to link to other presentations.
Code below throws the exception.
using var sourcePresentation = SCPresentation.Open("SourceTemplate.pptx");
if (File.Exists("NewPresentation.pptx"))
{
File.Delete("NewPresentation.pptx");
}
//create four shapes with a long text in each
var slide = sourcePresentation.Slides[0];
for (int i = 0; i < 4; i++)
{
var shape = slide.Shapes.AddRectangle(150, 100 + 100 * i, 500, 50);
shape.TextFrame.Text = "This is a long text #" + i;
When setting a hyperlink to filename an exception is thrown "Hyperlink is invalid.".
Powerpoint should be able to link to other presentations.
Code below throws the exception.
using var sourcePresentation = SCPresentation.Open("SourceTemplate.pptx");
if (File.Exists("NewPresentation.pptx"))
{
File.Delete("NewPresentation.pptx");
}
sourcePresentation.SaveAs("NewPresentation.pptx");
//create four shapes with a long text in each
var slide = sourcePresentation.Slides[0];
for (int i = 0; i < 4; i++)
{
var shape = slide.Shapes.AddRectangle(150, 100 + 100 * i, 500, 50);
shape.TextFrame.Text = "This is a long text #" + i;
}
sourcePresentation.Save();
The text was updated successfully, but these errors were encountered: