For some reason whenever my app automatically sends a file over e-mail, it cannot be opened/viewed on the phone. It is absolutely fine once the user opens on their desktop/outlook. But on the phone it just shows a black screen with the file title, and below it says "Office Open XML presentation" and then the file size. Any idea why? My iphone (or anyone elses) has no problem opening and viewing other pptx files.
Hi Hemalatha,
Thank you for getting back to me and sorry for the delayed response, having a newborn has lead to me having almost no time to work these days.
When I mentioned viewing the document, I meant just opening the file directly from the main phone mail app, not downloading it and opening somewhere else.
It took me quite some time but I finally found out the culprit, it's the INotesSlide AddNotesSlide. Without it, when sending the file via e-mail, it can be viewed normally like any other .pptx document. With it, nothing.
Below is the code:
IPresentation pptxDoc = Presentation.Create();
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
slide.Background.Fill.FillType = FillType.None;
INotesSlide notesSlide = slide.AddNotesSlide();
notesSlide.NotesTextBody.AddParagraph("This is it");
MemoryStream stream = new MemoryStream();
pptxDoc.Save(stream);
stream.Position = 0;
pptxDoc.Close();
pptxDoc.Dispose();
string docTitle = "PPTSample.pptx";
await JS.SaveAs(docTitle, stream.ToArray());
await stream.DisposeAsync();
stream.Close();
Any MS-PowerPoint document created by me (or anyone else) on my machine works fine on the e-mail, even with notes. Any suggestions would be appreciated. The file uploader says that the file type is not allowed.
Hi Hemalatha,
Thank you so much for getting back to me on this.
Great, I will be looking forward to your update.
Best regards,
Eric
Hi Hemalatha,
Thank you so much for getting back to me. I am so sorry I was not more precise on the version I am using (on the same day I opened another thread, for another query, and there I specify the version, and here I forgot). I am using 18.3.0.48
Hi,
I just saw that this fix was completed with today's rollout, however, I am still not able to see an improvement on the version I am using (18.3.0.48). What am I missing?
Looking forward to hearing from you. Thanks a lot as always!