DocumentBase.SaveAsQuickStyleSet Method (String)


Saves the group of quick styles currently in use.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public void SaveAsQuickStyleSet(
	string fileName


Type: System.String

The full path of the quick style set file.

The following code example saves the current set of quick styles to a .dotx file and causes Microsoft Office Word to display the new quick style set in the Style Set list. To use this example, run it from the ThisDocument class in a document-level project.

private void SaveQuickStyleSet()
    string appDataFolder = 
    string quickStyleFile = "NewQuickStyleSet.dotx";
    this.SaveAsQuickStyleSet(appDataFolder + @"\Microsoft\QuickStyles\" 
        + quickStyleFile);
Return to top