ITextPara::GetStyle method

Retrieves the style handle to the paragraphs in the specified range.

Syntax


HRESULT GetStyle(
  long *pValue
);

Parameters

pValue

Type: long*

The paragraph style handle. For more information, see the Remarks.

Return value

Type: HRESULT

If ITextPara::GetStyle succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information about COM error codes, see Error Handling in COM.

Return codeDescription
Value

Meaning

E_INVALIDARG

Invalid argument.

CO_E_RELEASED

The paragraph formatting object is attached to a range that has been deleted.

 

Remarks

The Text Object Model (TOM) version 1.0 has no way to specify the meanings of user-defined style handles. They depend on other facilities of the text system implementing TOM. Negative style handles are reserved for built-in character and paragraph styles. Currently defined values are listed in the following table. For a description of the following styles, see the Microsoft Word documentation.

Style ValueStyleValue
StyleNormal–1StyleTableofAuthorities–45
StyleHeading1–2StyleMacroText–46
StyleHeading2–3StyleTOAHeading–47
StyleHeading3–4StyleList–48
StyleHeading4–5StyleListBullet–49
StyleHeading5–6StyleListNumber–50
StyleHeading6–7StyleList2–51
StyleHeading7–8StyleList3–52
StyleHeading8–9StyleList4–53
StyleHeading9–10StyleList5–54
StyleIndex1–11StyleListBullet2–55
StyleIndex2–12StyleListBullet3–56
StyleIndex3–13StyleListBullet4–57
StyleIndex4–14StyleListBullet5–58
StyleIndex5–15StyleListNumber2–59
StyleIndex6–16StyleListNumber3–60
StyleIndex7–17StyleListNumber4–61
StyleIndex8–18StyleListNumber5–62
StyleIndex9–19StyleTitle–63
StyleTOC1–20StyleClosing–64
StyleTOC2–21StyleSignature–65
StyleTOC3–22StyleDefaultParagraphFont–66
StyleTOC4–23StyleBodyText–67
StyleTOC5–24StyleBodyTextIndent–68
StyleTOC6–25StyleListContinue–69
StyleTOC7–26StyleListContinue2–70
StyleTOC8–27StyleListContinue3–71
StyleTOC9–28StyleListContinue4–72
StyleNormalIndent–29StyleListContinue5–73
StyleFootnoteText–30StyleMessageHeader–74
StyleAnnotationText–31StyleSubtitle–75
StyleHeader–32StyleSalutation–76
StyleFooter–33StyleDate–77
StyleIndexHeading–34StyleBodyTextFirstIndent–78
StyleCaption–35StyleBodyTextFirstIndent2–79
StyleTableofFigures–36StyleNoteHeading–80
StyleEnvelopeAddress–37StyleBodyText2–81
StyleEnvelopeReturn–38StyleBodyText3–82
StyleFootnoteReference–39StyleBodyTextIndent2–83
StyleAnnotationReference–40StyleBodyTextIndent3–84
StyleLineNumber–41StyleBlockQuotation–85
StylePageNumber–42StyleHyperlink–86
StyleEndnoteReference–43StyleHyperlinkFollowed–87
StyleEndnoteText–44   

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

Reference
ITextPara
SetStyle
Conceptual
Text Object Model

 

 

Community Additions

ADD
Show:
© 2015 Microsoft