We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert WordML to presentation

how to access the attachment?

How to access the attachment?

hello alexey,

i am also want to use this feature. Actually i have a web service that provide xml data and internally using XSLT it transform into WordML and its display successfully on MS word. but now the thing is, i need to accept this wordML and form that wordML i want to create presentaionML i.e. presentation slide with styling that wordML has allready. is it possible with aspose. in .NET using VSTO c#.? please help on the same

Thank you

@satishbhuktar

Thanks for your inquiry. The forum thread you are referring is very old and attachments are not available. With Aspose.Words, you cannot convert Word document to PowerPoint document. However, you can read the content of Word document using Aspose.Words and import them into PowerPoint document using Aspose.Slides. Please note that DOCX and PPTX formats are quite different so it’s hard to achieve 100% fidelity.

hello tahir,

thanks for your reply.

the above scenario is meaningful for me. please can you give me the code snippet to get the idea for the same.

@satishbhuktar,

Thanks for your inquiry. Please ZIP and attach your input Word document and expected output PPTX file here for our reference. We will then provide you more information about your query.

hello tahir

as suggested, the input doc file and output ppt file is attached. currently we getting the wordML from the web services from our web application. we need to take that wordML and process it and generate the ppt slide by using presentaionML . please review both file.

thanks in advance.

FilesForReview.zip (37.6 KB)

@satishbhuktar,

Thanks for sharing the document. The ZIP file does not have WordML document. Please share the input WordML document.

hello tahir,

following file have both word doc and its ppt

reviewFileBoth.zip (58.3 KB)

hello tahir,

i am sending wordML file too. (in this wordML, i remove the chart control, we use image instead of the chart controls. so you can skip the chart in input doc and out put doc as well ). instead of chart please use(place) any image. for us,the main intention is the styling. we just need to keep the style nearly same i.e. appearance on doc nearly same as it appear on slide. (other things like chars ,graphs we will place the images on the slide ) .requesting for the code snippet to get a idea using aspose. we use c# with vsto plugin

thanks in advance.
inputWordML.zip (1.0 KB)

@satishbhuktar

Unfortunately, there is no direct method available to convert or import WordML to presentation. You need to read the WordML document using Aspose.Words and insert them into PPTX using Aspose.Slides. Please refer to the following articles.
Formatting Shapes
Adding and Formatting Text
Programming with Documents using Aspose.Words

Hello tahir,

thank you for your quick response. i gone through the links but not found the Actual way to achive this. can you please share the code snippet for just to get the idea like how to read wordML doc using aspose.DOC and after done with this, how to insert that into the slide using the aspose.Slide…for e.g. how can we done this with “Hello world” message, read wordML and inert it into slide using aspose.slide…this scenario will also helpful for me…requesting just a code example to get the idea for the same

thank you

@satishbhuktar

Thanks for your inquiry. Following code example shows how to read the text of Word document and its font name and size using Aspose.Words.

Document doc = new Document(MyDir + "inputDocFile.docx");

foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
{
    Console.WriteLine(para.ToString(SaveFormat.Text));
    Console.WriteLine(para.ParagraphFormat.Style.Font.Name);
    Console.WriteLine(para.ParagraphFormat.Style.Font.Size);
}

Please read the following article about adding text into the presentation file.
Adding and Formatting Text

hello tahir,

thanks for the answer, please tell me the rest part of ppt slide, how to apply this to the slide. means create presentation object and then create shape but how to apply para styling and insert it e.t.c.

thank you in advance

@satishbhuktar,

I have observed your requirements and suggest you to please visit the following documenatation section for your convenience that contain examples for adding AutoShapes (text shapes) and applying font styling on them.

Adding Text box
Formatting Text

Hello,

i appreciate your help.

ok. means after getting the wordDocument in the Object, we need to iterate through the each para and need to apply shapes and add the text in to it and apply font styling to it programatically .

so there is any kind of feature in aspose to take wordML (suppose paragraph) and convert that paragraph in PresentaionML and Insert that PresentaionML in to slide, then that para will get created there with all related styling as in wordML?

like in word, it provide the functionality to take a wordML and directly create the content on word page. so is there any feature in aspose like that for PowerPoint?

Thank you for your valuable support.

@satishbhuktar,

I have observed your above comments and regret to share that Aspose.Words and Aspose.Slides are completely two different APIs targeting on different document types and formats. There is no common interface between the two APIs and both work differently on MS Word and MS PowerPoint files respectively. If one has to copy data from one flle format to other by using these two APIs, he has to devise his own approach in this regard. This is neither limitation nor a missing feature in APIs. I hope the shared elaboration will be helpful.

hello mudassir and tahir.

I appreciate your help. with above mentioned scenario, i want to ask for one alternative scenario as follows,

suppose,

I have the wordML(suppose for a paragraph i have wordML) and i am able to convert it in to presentaionML by XSLT. so now, am i able to embed that presentaionML in to slide to create a para with its styling?

this can be alternative approach for my requirement if its possible…

@satishbhuktar,

I have observed the scenario shared by you and like to share that as far as Aspose.Slides is concerned, it supports loading PresentationML just like loading other normal presentation files. Aspose.Slides also offers to copy/clone slides from one presentation to other or even shapes from one slide to other. You can use any of the approach to copy the desired shape with text to anywhere in your target presentation slide. I hope the shared elaboration will be helpful. Please visit the following documentation links for your kind reference as well.