CustomUI Aspose.Words

Is there a way to customize the ribbon(CustomUI) in Word 2007/2010 using Aspose.Words? Like get and set?

Hi Lucas,

Thanks for your inquiry. Please note that Aspose.Words for .NET is a class library that enables your applications to perform a great range of document processing tasks.

Customize the ribbon(CustomUI) in Word 2007/2010 is MS Word (Application) level setting which is not stored in the document and therefore cannot be controlled by Aspose.Words. This is completely controlled by the viewer which opens the document.

Please let us know if you have any more queries.

I can use OpenXML to include the xml ribbom in word document , Aspose.Words does not have this functionality ?

using OpenXML
byte [ ] updatedDocumentContent = null;
if ( documentContent ! = null )
{
using ( MemoryStream memorystream = new MemoryStream ( ) )
{
memoryStream.Write ( documentContent 0, documentContent.Length );
ribbonXMLAsString GetRibbonXML string = ( ) ToString ( ) . ;
using ( WordprocessingDocument myDoc WordprocessingDocument.Open = ( MemoryStream , true) )
{
MainDocumentPart mainPart = myDoc.MainDocumentPart ;
if ( myDoc.GetPartsCountOfType ( ) > 0 )
{
myDoc.DeletePart ( myDoc.GetPartsOfType ( ) First () . ) ;
}
RibbonExtensibilityPart ribbonExtensibilityPart myDoc.AddNewPart = ();
ribbonExtensibilityPart.CustomUI = new DocumentFormat.OpenXml.Office.CustomUI.CustomUI ( ribbonXMLAsString ) ;
myDoc.CreateRelationshipToPart ( ribbonExtensibilityPart );
}
updatedDocumentContent memoryStream.ToArray = ();
}
}
updatedDocumentContent return ;

clip_image006[5]

Hi Lucas,

Thanks for sharing the detail. Unfortunately, Aspose.Words does not support the requested feature at the moment. However, I have logged the this feature (customize the ribbon(CustomUI) in Word 2007/2010)
as WORDSNET-10177 in our issue tracking system. Our development team
will look into the possibility of implementation of this requested
feature. Once we have any information about this feature, we will update you via this thread. We apologize for your inconvenience.


It would be great if you please attach your Word document which contains CustomUI here for our reference.

A post was merged into an existing topic: Add feature to customize the ribbon (CustomUI) in MS Word