PowerPoint.BulletFormat class
Représente les propriétés de mise en forme des puces d’un texte joint à PowerPoint.ParagraphFormat.
- Extends
Remarques
[ Ensemble d’API : PowerPointApi 1.4 ]
Exemples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/text/get-set-textrange.yaml
// Gets navigational (complex) properties of the selected text range.
await PowerPoint.run(async (context) => {
const textRange: PowerPoint.TextRange = context.presentation.getSelectedTextRange();
textRange.load("font,paragraphFormat/bulletFormat,paragraphFormat/horizontalAlignment");
await context.sync();
console.log("Font properties of selected text range:");
console.log(`\tallCaps: ${textRange.font.allCaps}`);
console.log(`\tbold: ${textRange.font.bold}`);
console.log(`\tcolor: ${textRange.font.color}`);
console.log(`\tdoubleStrikethrough: ${textRange.font.doubleStrikethrough}`);
console.log(`\titalic: ${textRange.font.italic}`);
console.log(`\tname: ${textRange.font.name}`);
console.log(`\tsize: ${textRange.font.size}`);
console.log(`\tsmallCaps: ${textRange.font.smallCaps}`);
console.log(`\tstrikethrough: ${textRange.font.strikethrough}`);
console.log(`\tsubscript: ${textRange.font.subscript}`);
console.log(`\tsuperscript: ${textRange.font.superscript}`);
console.log(`\tunderline: ${textRange.font.underline}`);
console.log("Paragraph format properties of selected text range:");
console.log(`\tbulletFormat.visible: ${textRange.paragraphFormat.bulletFormat.visible}`);
console.log(`\thorizontalAlignment: ${textRange.paragraphFormat.horizontalAlignment}`);
});
Propriétés
| context | Contexte de requête associé à l’objet . Cela connecte le processus du complément au processus de l’application hôte Office. |
| style | Spécifie le style des puces dans le paragraphe. Pour plus d’informations , voir PowerPoint.BulletStyle . Renvoie |
| type | Spécifie le type des puces dans le paragraphe. Pour plus d’informations , voir PowerPoint.BulletType . Renvoie |
| visible | Spécifie si les puces du paragraphe sont visibles. Renvoie |
Méthodes
| load(options) | Files d’attente de la commande pour charger les propriétés de l’objet spécifié. Vous devez contacter |
| load(property |
Files d’attente de la commande pour charger les propriétés de l’objet spécifié. Vous devez contacter |
| load(property |
Files d’attente de la commande pour charger les propriétés de l’objet spécifié. Vous devez contacter |
| toJSON() | Remplace la méthode JavaScript |
Détails de la propriété
context
Contexte de requête associé à l’objet . Cela connecte le processus du complément au processus de l’application hôte Office.
context: RequestContext;
Valeur de propriété
style
Notes
Cet API est fourni en tant qu’aperçu pour les développeurs et peut être modifié en fonction des commentaires que nous avons reçus. N’utilisez pas cet API dans un environnement de production.
Spécifie le style des puces dans le paragraphe. Pour plus d’informations , voir PowerPoint.BulletStyle . Renvoie null si PowerPoint.TextRange inclut des fragments de texte avec différentes propriétés de mise en forme des puces.
style: PowerPoint.BulletStyle | "Unsupported" | "AlphabetLowercasePeriod" | "AlphabetUppercasePeriod" | "ArabicNumeralParenthesisRight" | "ArabicNumeralPeriod" | "RomanLowercaseParenthesesBoth" | "RomanLowercaseParenthesisRight" | "RomanLowercasePeriod" | "RomanUppercasePeriod" | "AlphabetLowercaseParenthesesBoth" | "AlphabetLowercaseParenthesisRight" | "AlphabetUppercaseParenthesesBoth" | "AlphabetUppercaseParenthesisRight" | "ArabicNumeralParenthesesBoth" | "ArabicNumeralPlain" | "RomanUppercaseParenthesesBoth" | "RomanUppercaseParenthesisRight" | "SimplifiedChinesePlain" | "SimplifiedChinesePeriod" | "CircleNumberDoubleBytePlain" | "CircleNumberWideDoubleByteWhitePlain" | "CircleNumberWideDoubleByteBlackPlain" | "TraditionalChinesePlain" | "TraditionalChinesePeriod" | "ArabicAlphabetDash" | "ArabicAbjadDash" | "HebrewAlphabetDash" | "KanjiKoreanPlain" | "KanjiKoreanPeriod" | "ArabicDoubleBytePlain" | "ArabicDoubleBytePeriod" | "ThaiAlphabetPeriod" | "ThaiAlphabetParenthesisRight" | "ThaiAlphabetParenthesesBoth" | "ThaiNumeralPeriod" | "ThaiNumeralParenthesisRight" | "ThaiNumeralParenthesesBoth" | "HindiAlphabetPeriod" | "HindiNumeralPeriod" | "KanjiSimplifiedChineseDoubleBytePeriod" | "HindiNumeralParenthesisRight" | "HindiAlphabet1Period" | null;
Valeur de propriété
PowerPoint.BulletStyle | "Unsupported" | "AlphabetLowercasePeriod" | "AlphabetUppercasePeriod" | "ArabicNumeralParenthesisRight" | "ArabicNumeralPeriod" | "RomanLowercaseParenthesesBoth" | "RomanLowercaseParenthesisRight" | "RomanLowercasePeriod" | "RomanUppercasePeriod" | "AlphabetLowercaseParenthesesBoth" | "AlphabetLowercaseParenthesisRight" | "AlphabetUppercaseParenthesesBoth" | "AlphabetUppercaseParenthesisRight" | "ArabicNumeralParenthesesBoth" | "ArabicNumeralPlain" | "RomanUppercaseParenthesesBoth" | "RomanUppercaseParenthesisRight" | "SimplifiedChinesePlain" | "SimplifiedChinesePeriod" | "CircleNumberDoubleBytePlain" | "CircleNumberWideDoubleByteWhitePlain" | "CircleNumberWideDoubleByteBlackPlain" | "TraditionalChinesePlain" | "TraditionalChinesePeriod" | "ArabicAlphabetDash" | "ArabicAbjadDash" | "HebrewAlphabetDash" | "KanjiKoreanPlain" | "KanjiKoreanPeriod" | "ArabicDoubleBytePlain" | "ArabicDoubleBytePeriod" | "ThaiAlphabetPeriod" | "ThaiAlphabetParenthesisRight" | "ThaiAlphabetParenthesesBoth" | "ThaiNumeralPeriod" | "ThaiNumeralParenthesisRight" | "ThaiNumeralParenthesesBoth" | "HindiAlphabetPeriod" | "HindiNumeralPeriod" | "KanjiSimplifiedChineseDoubleBytePeriod" | "HindiNumeralParenthesisRight" | "HindiAlphabet1Period" | null
Remarques
[ Ensemble d’API : PowerPointApi BETA (PRÉVERSION UNIQUEMENT) ]
type
Notes
Cet API est fourni en tant qu’aperçu pour les développeurs et peut être modifié en fonction des commentaires que nous avons reçus. N’utilisez pas cet API dans un environnement de production.
Spécifie le type des puces dans le paragraphe. Pour plus d’informations , voir PowerPoint.BulletType . Renvoie null si PowerPoint.TextRange inclut des fragments de texte avec différentes propriétés de mise en forme des puces.
type: PowerPoint.BulletType | "Unsupported" | "None" | "Numbered" | "Unnumbered" | null;
Valeur de propriété
PowerPoint.BulletType | "Unsupported" | "None" | "Numbered" | "Unnumbered" | null
Remarques
[ Ensemble d’API : PowerPointApi BETA (PRÉVERSION UNIQUEMENT) ]
visible
Spécifie si les puces du paragraphe sont visibles. Renvoie null si PowerPoint.TextRange inclut des fragments de texte avec différentes valeurs de visibilité des puces.
visible: boolean | null;
Valeur de propriété
boolean | null
Remarques
Détails de la méthode
load(options)
Files d’attente de la commande pour charger les propriétés de l’objet spécifié. Vous devez contacter context.sync() avant de lire les propriétés.
load(options?: PowerPoint.Interfaces.BulletFormatLoadOptions): PowerPoint.BulletFormat;
Paramètres
Fournit des options pour les propriétés de l’objet à charger.
Retours
load(propertyNames)
Files d’attente de la commande pour charger les propriétés de l’objet spécifié. Vous devez contacter context.sync() avant de lire les propriétés.
load(propertyNames?: string | string[]): PowerPoint.BulletFormat;
Paramètres
- propertyNames
-
string | string[]
Chaîne délimitée par des virgules ou tableau de chaînes qui spécifient les propriétés à charger.
Retours
load(propertyNamesAndPaths)
Files d’attente de la commande pour charger les propriétés de l’objet spécifié. Vous devez contacter context.sync() avant de lire les propriétés.
load(propertyNamesAndPaths?: {
select?: string;
expand?: string;
}): PowerPoint.BulletFormat;
Paramètres
- propertyNamesAndPaths
-
{ select?: string; expand?: string; }
propertyNamesAndPaths.select est une chaîne délimitée par des virgules qui spécifie les propriétés à charger, et propertyNamesAndPaths.expand est une chaîne délimitée par des virgules qui spécifie les propriétés de navigation à charger.
Retours
toJSON()
Remplace la méthode JavaScript toJSON() afin de fournir une sortie plus utile lorsqu’un objet API est passé à JSON.stringify(). (JSON.stringify, à son tour, appelle la toJSON méthode de l’objet qui lui est passé.) Alors que l’objet d’origine PowerPoint.BulletFormat est un objet API, la toJSON méthode renvoie un objet JavaScript brut (typé en tant PowerPoint.Interfaces.BulletFormatDataque ) qui contient des copies superficielles de toutes les propriétés enfants chargées de l’objet d’origine.
toJSON(): PowerPoint.Interfaces.BulletFormatData;