How to insert a video file on OneNote page

Hi Amjad, Kindly let me know any update on this issue.

@SurinderH,

We are sorry, but the situation remains the same. We could not find the root cause of your issue. Once we figure it out or have some new updates on it, we will let you know.

Hi Amjad, Kindly let me know any update on this issue.

@SurinderH,

No updates yet. Hopefully, we will get back to you with updates soon.

@SurinderH,

To update you on your issue, currently, we are evaluating and reproducing the issue using different OneNote app versions. As you know, it does not affect all OneNote builds. Anyways, once we have any new information available regarding your issue, we will update you here.

Many Thanks, Amjad.

@SurinderH,

You are welcome. We will keep you posted with new updates (once available).

@SurinderH,

We were able to reproduce the issue and found the root cause of the issue. For the time being, we found a way to avoid it, so you may try it. Please note, it is always necessary to indicate an icon for a new image. To do this you need to use this constructor AttachedFile.AttachedFile | Aspose.Note for .NET API Reference
public AttachedFile(string path, Stream icon, ImageFormat iconFormat)

For example, you may change the line:

attachedFile = new AttachedFile("C:\\Temp\\OneNote\\LeoVegas Ad.MP3");

to:

attachedFile = new AttachedFile("C:\\Temp\\OneNote\\LeoVegas Ad.MP3", new FileStream("C:\\Temp\\OneNote\\videoicon.png", FileMode.Open),ImageFormat.Png);

Please try it and it will work fine (as I tested). Let us know if you still find the issue.

Also, we will undertake to edit the constructors for the AttachedFile class (in the upcoming versions) in order to prevent such a problem in the future.

Many Thanks Amjad.

@SurinderH,

You are welcome.