Collapse the table of content
Expand the table of content
Expand Minimize

DocumentBase.SaveAsQuickStyleSet Method

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
)

Parameters

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 = 
        Environment.ExpandEnvironmentVariables("%APPDATA%");
    string quickStyleFile = "NewQuickStyleSet.dotx";
    this.SaveAsQuickStyleSet(appDataFolder + @"\Microsoft\QuickStyles\" 
        + quickStyleFile);
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft