Closed Uttam-Gupta closed 7 months ago
@JinghuiMS @ononder Any update on this issue? We have a lot of customers using this feature, so any kind of information on this issue would be highly helpful. Thanks.
From official document(https://docs.microsoft.com/en-us/office/dev/add-ins/powerpoint/insert-slides-into-presentation#insert-slides-with-insertslidesfrombase64), the inserted slides keep the formatting of the source file by default, otherwise, you can use below code to keep the formatting of the destination.
async function insertSlidesDestinationFormatting() {
await PowerPoint.run(async function(context) {
context.presentation
.insertSlidesFromBase64(chosenFileBase64,
{
formatting: "UseDestinationTheme",
targetSlideId: "267#"
}
);
await context.sync();
});
}
@ononder What do you experts think about this issue?
@JinghuiMS Thanks for your input but the issue is that source formatting is not getting retained for the file I've attached.
@Uttam-Gupta If you don't specific to use "formatting: "UseDestinationTheme"", it should keep the formatting of source file by default.
@JinghuiMS The issue is that even if we are using the 'Source Formatting', the exact formatting doesn't seem to appear. We have used { formatting: 'KeepSourceFormatting' }
but it's not working as expected for the file i've attached. The issue seems to appear only for certain files.
We need to investigate this more, one quick question on top of my head is, does this happen with a specific content on the given file or does it happen with all files? If it doesn't happen with all files, we should try to find the problematic content in that file.
@ononder I agree, but I'm not able to figure out the root cause in that particular file. I've attached the file in this post, can you please guide me on how I can help you? It doesn't happen with all files but in the powerpoint file I've attached, it seems to happen for all slides.
@ononder @JinghuiMS Any luck in this, please? We are really requesting some help. Please let us know if any workaround
Provide required information needed to triage your issue
Your Environment
Expected behavior
In my application, I'm using the 'Insert Slide from Base 64' function in Powerpoint API. The slide inserted should use the same original formatting from the PPTX file (from which the base64 string is created)
PowerPoint.run(function (context) { return context.sync.then(function(){ context.presentation.insertSlidesFromBase64(base64String),{ formatting: 'KeepSourceFormatting' }; return context.sync() }) });
Current behavior
The content formatting which is present in the original PPTX file is not carried over when using the PowerPoint API.
Steps to reproduce
Provide additional details
Context
I have an application, which stores a list of PPTX files in cloud, the user can select the file using the addin and insert all the slides from the PPTX file.
Useful logs
Lookup_addin_issue_file.pptx
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.