DocumentBase.SaveAsQuickStyleSet(String) Method

Definition

Saves the group of quick styles currently in use.

public:
 void SaveAsQuickStyleSet(System::String ^ fileName);
public void SaveAsQuickStyleSet (string fileName);
member this.SaveAsQuickStyleSet : string -> unit
Public Sub SaveAsQuickStyleSet (fileName As String)

Parameters

fileName
String

The full path of the quick style set file.

Examples

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);
}
Private Sub SaveQuickStyleSet()
    Dim appDataFolder As String = _
        Environment.ExpandEnvironmentVariables("%APPDATA%")
    Dim quickStyleFile As String = "NewQuickStyleSet.dotx"
    Me.SaveAsQuickStyleSet(appDataFolder + "\Microsoft\QuickStyles\" _
        + quickStyleFile)
End Sub

Applies to