DocumentBase.StyleSortMethod Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Stiller görev bölmesinde stilleri sıralarken kullanılacak sıralama yöntemini belirten bir değeri alır veya ayarlar.
public:
property Microsoft::Office::Interop::Word::WdStyleSort StyleSortMethod { Microsoft::Office::Interop::Word::WdStyleSort get(); void set(Microsoft::Office::Interop::Word::WdStyleSort value); };
public Microsoft.Office.Interop.Word.WdStyleSort StyleSortMethod { get; set; }
member this.StyleSortMethod : Microsoft.Office.Interop.Word.WdStyleSort with get, set
Public Property StyleSortMethod As WdStyleSort
Özellik Değeri
Değerlerden WdStyleSort biri.
Örnekler
Aşağıdaki kod örneği , Stiller görev bölmesi için geçerli sıralama yöntemini görüntüler. Ardından, geçerli sıralama yöntemi alfabetik sıralama yöntemi değilse, kod kullanıcıya sıralama yönteminin değiştirilmek üzere olduğunu bildiren bir ileti görüntüler ve ardından sıralama yöntemini alfabetik sıralama düzenine değiştirir. Bu örneği kullanmak için belge düzeyinde bir projede sınıfından ThisDocument
çalıştırın.
private void SetStyleSortOrder()
{
MessageBox.Show("Current sort method for the styles task pane is: "
+ this.StyleSortMethod.ToString());
if (this.StyleSortMethod != Word.WdStyleSort.wdStyleSortByName)
{
MessageBox.Show("Changing sort method to "
+ Word.WdStyleSort.wdStyleSortByName.ToString()
+ " to sort styles alphabetically in the styles "
+ "task pane.");
this.StyleSortMethod = Word.WdStyleSort.wdStyleSortByName;
}
}
Private Sub SetStyleSortOrder()
MessageBox.Show("Current sort method for the styles task pane is: " _
+ Me.StyleSortMethod.ToString())
If Me.StyleSortMethod <> Word.WdStyleSort.wdStyleSortByName Then
MessageBox.Show("Changing sort method to " _
+ Word.WdStyleSort.wdStyleSortByName.ToString() _
+ " to sort styles alphabetically in the styles " _
+ "task pane.")
Me.StyleSortMethod = Word.WdStyleSort.wdStyleSortByName
End If
End Sub