In PowerPoint 2016 UI, it is possible to apply a gradient to the Border of a shape. The same however cannot be done using Microsoft.Office.Interop.PowerPoint in C#. I was able to apply a gradient to the shape but not to its border. Kindly advise how can it be achieved.
How to apply Gradient to Line/Border of a shape in Powerpoint using C#?
1.5k Views Asked by Rupesh Bhurke At
2
There are 2 best solutions below
Related Questions in OFFICE365
- Can you programmatically generate a link to open a Word document and navigate to a particular location within it (preferably a comment)?
- Excel dynamically calculate cost of products based on bill of materials (BOM) and purchase price history
- Microsoft Office 365 problem cannot open a blank excel document
- In OfficeScript, how can I make it return the number of cells with a red background?
- Visual Studio write to Office 365 word
- Audit a share Excel workbook
- Copy paste a single value from within a cell to another cell
- Highlight column based on current date and time
- Share Outlook calendars with all members of specific security group
- Python IMAP4 keeps throwing this error when I'm connecting to Outlook. Has anyone seen this error before?
- IMAP configs for Outlook using Mail-listener
- How to add a new menu item on OneDrive action menu?
- Unable to locate fields in Microsoft Access
- Download Sharepoint aspx pages as pdf using python
- VBA - detect if user is running on 365
Related Questions in POWERPOINT
- Microsoft Office 365 problem cannot open a blank excel document
- Limit object movement to one axis only in Powerpoint
- How to convert a PPTX file to PDF using Python without depending on Windows (For Linux)
- SSRS report exporting as PPT file
- Difficulty Embedding Fonts in PowerPoint Slides via insertSlidesFromBase64 Method
- When I click "enable macros" on my PowerPoint presentation, I get an error saying controls can't be activated. They're not registered on this computer
- Is there a way of assigning subscripts/superscripts as shown below?
- VB code to set two color gradient in PowerPoint cell table
- How can I copy a date from excel to powerpoint through vba and forcing english format regardless of local formatting?
- Is there a way to have a working drop-down list in a table from a slide in a PowerPoint file that is being displayed in MS Teams?
- Edit Excel Cell with ActiveX
- VBA pasting from Excel to PowerPoint has stopped working
- Link shape size and position to a text table dynamic content
- VBA PowerPoint Run-time error '-2147467259' (80004005): Presentation.Close: Failed
- python pptx not extracting all the text
Related Questions in OFFICE-INTEROP
- Visual Studio write to Office 365 word
- Why PresentationOpen event is not triggered when opening an existing presentation via an hyperlink in the current presentation?
- How to programmatically spellcheck a word using Microsoft Office dictionary for specified language?
- Returning x pages from a Word document and creating a new document with them
- Manipulate .dotm files without launch MS Word
- FormulaArray inserted from C# API only displays the first item in array until array formula is edited and recalculated
- cannot get Document.SensitivityLabel property of AIP protected document
- Updating all images in a Word Doc (.doc) using C#
- Microsoft.Office.Interop.Word add tables to document
- Simple way to access to Excel cell by its "coordination" eg "B7" instead of [7,1]
- Through VB.NET, how do you add and edit code modules of an Excel file using Microsoft.Office.Interop.Excel?
- The DCOM configuration for 'Run application in this computer' is automatically flagged
- Unable to Deploy .NET Core Application with Microsoft.Office.Interop.Word via Azure DevOps Pipeline
- Upgrading old .NET 4.8 project to use Sharepoint online
- How to designate a PowerPoint table as a header row with interop?
Related Questions in OFFICE-ADDINS
- office web addin URLs in manifest to local images
- Excel addin authentication for manifest referenced files
- Does the Excel desktop client have a DOM Document, and how do I get to it?
- Why PresentationOpen event is not triggered when opening an existing presentation via an hyperlink in the current presentation?
- Why can't I get a result from the Office.context.mailbox.item.to.getAsync function?
- VB code to set two color gradient in PowerPoint cell table
- Removing SlideMasters using the PowerPoint API
- how to get access token in word document 365 in desktop view
- Develop Add-in from an existing spreadsheet Excel JavaScript API
- Microsoft Excel Add-in Microphone Access
- PowerPoint JS API: connect 2 rectangles
- How can I get the full content of a Word Document?
- "Trusted Add-in Catalogs" in the Trust Center settings of Outlook is missing on my system
- Custom Web Addin is not shown on a ribbon
- Word Office Javascript API - Format first x chars
Related Questions in POWERPOINT-2016
- the fonts within SmartArt shapes in the PowerPoint presentation were not replaced as expected by using python
- Change default sub-level list symbol
- Inserting Summary Zoom Slide into PowerPoint Presentation 2016
- Looking for a way in PowerPoint to search and replace all (R) normal text with (R) superscript text
- ThinkCell change link Excel of the chart Power Point
- Slide transition effects fail in a vba controlled PowerPoint presentation
- Why is vba (powerpoint) generating an error ......Integer is out of range. 1 is not in the valid range of 1 to 0?
- How can I add the Text Highlight Color control to a custom xml ribbon in PowerPoint?
- Adding sound effects to macro-generated PPT slides causes animations to change apparently randomly
- Copy/Paste CheckBoxes If True In PowerPoint
- How to find out if two shape objects in PowerPoint intersect with each other?
- How to apply Gradient to Line/Border of a shape in Powerpoint using C#?
- List of objects in front of an object in PowerPoint using VSTO
- How can I open the most recent SharePoint version of a file with PowerPoint VBA?
- ppt Slide and textbox selection macros
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I agree: there is no way that I can see to set a line gradient via the Interop assemblies. The clue for me was that you can't use the simple controls on the ribbon to do this, you need to use "Format Shape", and then you can set a bunch of stuff that also isn't available. This led me to think it was in the XML of the file, not accessible via the Object Model (OM) that the interop library provides.
I would recommend using a tool that can interact with the XML of the file itself, not just the application. It may also benefit you that you won't need to actually run PowerPoint, just edit the file. That can be faster.
Example tools are the Open XML SDK and something like Aspose.Slides, both of which edit the files directly.
MS-provided Interop libraries are dying. They've stopped distributing signed copies for the most recent versions, instead letting developers generate and sign their own. Office add-ins are the new thing right now, as they are cross-platform.
I hope this helps. Good luck.