Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.27 KB

Project.Application.FileSaveWorkspace.md

File metadata and controls

60 lines (37 loc) · 1.27 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.FileSaveWorkspace method (Project)
vbapj.chm108
vbapj.chm108
project-server
Project.Application.FileSaveWorkspace
f7c524e5-aa9e-e1a2-6f32-defb7cc23f04
06/08/2017
medium

Application.FileSaveWorkspace method (Project)

Saves a list of open files and the current settings in the Options dialog box.

Syntax

expression. FileSaveWorkspace( _Name_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Name Optional String The name of the file to create. If Name is omitted, Project prompts for the file name.

Return value

Boolean

Example

The following example saves the workspace based upon the name of the first project file.

Sub SaveWorkspaceByProjectName() 
 
    Dim WSName As String 
 
    If InStr(Projects(1).Name, ".") Then 
        WSName = Left$(Projects(1).Name, Len(Projects(1).Name) - 1) & "W" 
    Else 
        WSName = Projects(1).Name & ".MPW" 
    End If 
 
    FileSaveWorkspace WSName 
End Sub

[!includeSupport and feedback]