Delete Comments Introduction
Comments in PowerPoint presentations are a tool that allows users to add explanations, notes, and discussions to each individual slide of a presentation. This functionality is valuable for collaborative work on a presentation, especially when multiple people are involved in the creation or editing process. The following API methods are for deleting comments from presentations.
You can delete all comments, or comments by a specific author. There is [a method]((/slides/get-comment-authors/) to retrieve the list of comment authors.
API
Type
Description
Resource
/slides/{name}/comments
DELETE
Deletes comments from a presentation saved in a storage.
DeleteComments
Request Parameters
Name
Type
Location
Required
Description
name
string
path
true
The name of the presentation file saved in a storage.
author
string
query
false
The author of the comments. If the author is not specified, all comments will be deleted.
password
string
header
false
The password to open the presentation.
folder
string
query
false
The folder where the presentation file is located.
storage
string
query
false
The storage where the presentation file is located.
In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.
Examples
Delete comments from author John Smith in the document MyPresentation.pptx .
cURL Solution
SDK Solutions
C#
using Aspose.Slides.Cloud.Sdk ;
class Application
{
static void Main ( string [] args )
{
var slidesApi = new SlidesApi ( "MyClientId" , "MyClientSecret" );
var documentName = "MyPresentation.pptx" ;
var author = "John Smith" ;
slidesApi . DeleteComments ( documentName , author );
}
}
Java
import com.aspose.slides.ApiException ;
import com.aspose.slides.api.SlidesApi ;
public class Application {
public static void main ( String [] args ) throws ApiException {
SlidesApi slidesApi = new SlidesApi ( "MyClientId" , "MyClientSecret" );
String documentName = "MyPresentation.pptx" ;
String author = "John Smith" ;
slidesApi . deleteComments ( documentName , author , null , null , null );
}
}
PHP
use Aspose\Slides\Cloud\Sdk\Api\Configuration ;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi ;
$configuration = new Configuration ();
$configuration -> setAppSid ( "MyClientId" );
$configuration -> setAppKey ( "MyClientSecret" );
$slidesApi = new SlidesApi ( null , $configuration );
$documentName = "MyPresentation.pptx" ;
$author = "John Smith" ;
$slidesApi -> deleteComments ( $documentName , $author );
Ruby
require "aspose_slides_cloud"
include AsposeSlidesCloud
configuration = Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
slides_api = SlidesApi . new ( configuration )
document_name = "MyPresentation.pptx"
author = "John Smith"
slides_api . delete_comments ( document_name , author )
Python
from asposeslidescloud.apis.slides_api import SlidesApi
slides_api = SlidesApi ( None , "MyClientId" , "MyClientSecret" )
document_name = "MyPresentation.pptx"
author = "John Smith"
slides_api . delete_comments ( document_name , author )
Node.js
const cloud = require ( "asposeslidescloud" );
const slidesApi = new cloud . SlidesApi ( "MyClientId" , "MyClientSecret" );
const documentName = "MyPresentation.pptx" ;
const author = "John Smith" ;
slidesApi . deleteComments ( documentName , author ). then (() => {
});
C++
#include "asposeslidescloud/api/SlidesApi.h"
using namespace asposeslidescloud :: api ;
int main ()
{
auto slidesApi = std :: make_shared < SlidesApi > ( L "MyClientId" , L "MyClientSecret" );
auto documentName = L "MyPresentation.pptx" ;
auto author = L "John Smith" ;
slidesApi -> deleteComments ( documentName , author ). get ();
}
Perl
use AsposeSlidesCloud::Configuration ;
use AsposeSlidesCloud::SlidesApi ;
my $config = AsposeSlidesCloud::Configuration -> new ();
$config -> { app_sid } = "MyClientId" ;
$config -> { app_key } = "MyClientSecret" ;
my $slides_api = AsposeSlidesCloud::SlidesApi -> new ( config => $config );
my %parameters = ( name => "MyPresentation.pptx" , author => "John Smith" );
$slides_api -> delete_comments ( %parameters );
Swift
Go
cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
_ , e := api . SlidesApi . DeleteComments ( "MyPresentation.pptx" , "John Smith" , "" , "" , "" )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
API
Type
Description
Resource
/slides/comments/delete
POST
Deletes comments from a presentation saved in a local file.
DeleteCommentsOnline
Request Parameters
Name
Type
Location
Required
Description
document
file
formData
true
The presentation file.
author
string
query
false
The author of the comments. If the author is not specified, all comments will be deleted.
password
string
header
false
The password to open the presentation.
API
Type
Description
Resource
/slides/{name}/slides/{slideIndex}/comments
DELETE
Deletes slide comments from a presentation saved in a storage.
DeleteSlideComments
Request Parameters
Name
Type
Location
Required
Description
name
string
path
true
The name of the presentation file saved in a storage.
slideIndex
integer
path
true
The 1-based index of the slide.
author
string
query
false
The author of the comments. If the author is not specified, all comments will be deleted.
password
string
header
false
The password to open the presentation.
folder
string
query
false
The folder where the presentation file is located.
storage
string
query
false
The storage where the presentation file is located.
In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.
Examples
Delete comments from author John Smith on the first slide in the document MyPresentation.pptx .
cURL Solution
SDK Solutions
C#
using Aspose.Slides.Cloud.Sdk ;
class Application
{
static void Main ( string [] args )
{
var slidesApi = new SlidesApi ( "MyClientId" , "MyClientSecret" );
var documentName = "MyPresentation.pptx" ;
var slideIndex = 1 ;
var author = "John Smith" ;
slidesApi . DeleteSlideComments ( documentName , slideIndex , author );
}
}
Java
import com.aspose.slides.ApiException ;
import com.aspose.slides.api.SlidesApi ;
public class Application {
public static void main ( String [] args ) throws ApiException {
SlidesApi slidesApi = new SlidesApi ( "MyClientId" , "MyClientSecret" );
String documentName = "MyPresentation.pptx" ;
int slideIndex = 1 ;
String author = "John Smith" ;
slidesApi . deleteSlideComments ( documentName , slideIndex , author , null , null , null );
}
}
PHP
use Aspose\Slides\Cloud\Sdk\Api\Configuration ;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi ;
$configuration = new Configuration ();
$configuration -> setAppSid ( "MyClientId" );
$configuration -> setAppKey ( "MyClientSecret" );
$slidesApi = new SlidesApi ( null , $configuration );
$documentName = "MyPresentation.pptx" ;
$slideIndex = 1 ;
$author = "John Smith" ;
$slidesApi -> deleteSlideComments ( $documentName , $slideIndex , $author );
Ruby
require "aspose_slides_cloud"
include AsposeSlidesCloud
configuration = Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
slides_api = SlidesApi . new ( configuration )
document_name = "MyPresentation.pptx"
slide_index = 1
author = "John Smith"
slides_api . delete_slide_comments ( document_name , slide_index , author )
Python
from asposeslidescloud.apis.slides_api import SlidesApi
slides_api = SlidesApi ( None , "MyClientId" , "MyClientSecret" )
document_name = "MyPresentation.pptx"
slide_index = 1
author = "John Smith"
slides_api . delete_slide_comments ( document_name , slide_index , author )
Node.js
const cloud = require ( "asposeslidescloud" );
const slidesApi = new cloud . SlidesApi ( "MyClientId" , "MyClientSecret" );
const documentName = "MyPresentation.pptx" ;
const slideIndex = 1 ;
const author = "John Smith" ;
slidesApi . deleteSlideComments ( documentName , slideIndex , author ). then (() => {
});
C++
#include "asposeslidescloud/api/SlidesApi.h"
using namespace asposeslidescloud :: api ;
int main ()
{
auto slidesApi = std :: make_shared < SlidesApi > ( L "MyClientId" , L "MyClientSecret" );
auto documentName = L "MyPresentation.pptx" ;
auto slideIndex = 1 ;
auto author = L "John Smith" ;
slidesApi -> deleteSlideComments ( documentName , slideIndex , author ). get ();
}
Perl
use AsposeSlidesCloud::Configuration ;
use AsposeSlidesCloud::SlidesApi ;
my $config = AsposeSlidesCloud::Configuration -> new ();
$config -> { app_sid } = "MyClientId" ;
$config -> { app_key } = "MyClientSecret" ;
my $slides_api = AsposeSlidesCloud::SlidesApi -> new ( config => $config );
my %parameters = ( name => "MyPresentation.pptx" , slide_index => 1 , author => "John Smith" );
$slides_api -> delete_slide_comments ( %parameters );
Swift
Go
cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
_ , _ , e := api . SlidesApi . DeleteSlideComments ( "MyPresentation.pptx" , 1 , "John Smith" , "" , "" , "" )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
API
Type
Description
Resource
/slides/slides/{slideIndex}/comments/delete
POST
Deletes slide comments from a presentation saved in a local file.
DeleteSlideCommentsOnline
Request Parameters
Name
Type
Location
Required
Description
document
file
formData
true
The presentation file.
slideIndex
integer
path
true
The 1-based index of the slide.
author
string
query
false
The author of the comments. If the author is not specified, all comments will be deleted.
password
string
header
false
The password to open the presentation.
SDKs
Check Available SDKs to learn how to add an SDK to your project.