Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7905727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:34:46+00:00 2026-06-03T10:34:46+00:00

In the code below the file name is hard coded, but I want the

  • 0

In the code below the file name is hard coded, but I want the user to be able to pick it.

I was reading about GetSaveAsFilename but I get an error when using it: “method or member not found”.

fileSaveName = Application.GetSaveAsFilename _
    (fileFilter:="Excel Files (*.txt), *.txt")

This is written for Word 2010. Am I wrong in thinking GetSaveAsFilename is available in word VBA?

 Sub Macro3()
'
' Macro3 Macro
'
'
    ActiveDocument.SaveAs2 FileName:="Questionnaire01-05-20122.txt", _
        FileFormat:=wdFormatText, LockComments:=False, Password:="", _
        AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, _
        EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _
        :=True, SaveAsAOCELetter:=False, Encoding:=1252, InsertLineBreaks:=False, _
         AllowSubstitutions:=False, LineEnding:=wdCRLF, CompatibilityMode:=0
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:34:48+00:00Added an answer on June 3, 2026 at 10:34 am

    You can provide a default path including filename like so to the dialog, ie

    Sub SaveName()
        Dim strFileName As String
        Dim StrPath As String
        'provide default filename
        StrPath = "c:\temp\test.docx"
        With Dialogs(wdDialogFileSaveAs)
            .Name = StrPath
            If .Display <> 0 Then
                strFileName = .Name
            Else
                strFileName = "User Cancelled"
            End If
        End With
        MsgBox strFileName
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With the following code below, There is an error saying File /home/user/web_pro/info/views.py, line 184,
The code below gives me the file name of the page I'm on e.g.
I have an issue where the code below sends the attachment but the file
I'm reading file names out of a directory with glob with the code below.
I have created a new file using the code below. But if the file
I create a .so file with the code below, but when I compile a
I am reading a plist file using code below. My problem is that the
I have a file input known as 'name=fileImage'. Now I have php code below
I write the code below to delete a file: FileInfo file = new FileInfo(filename);
I am learning backgroundworker class in WPF. The code below is in file MainWindow.xaml.cs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.