Word VBA >> Equivelent to Excel's Application.GetSaveAsFilename

by Q2Fyb2x5biBTcGVha21hbg » Fri, 23 Jul 2004 18:34:02 GMT

Can anyone tell me Word's equivelent to Excel's Application.GetSaveAsFilename, which returns either a true or false value?

Thanks,
Carolyn


Word VBA >> RE: Equivelent to Excel's Application.GetSaveAsFilename

by Q2Fyb2x5biBTcGVha21hbg » Fri, 23 Jul 2004 19:14:03 GMT


I have now discovered:
Application.FileDialog(msoFileDialogSaveAs).Show

But how can you specify a filename?

Carolyn






Similar Threads

1. Recreating Excel's 'Application.GetSaveAsFilename' in Word

Is it possible to recreate the following code (taken from Excel) in
Word?

filesavename = Application.GetSaveAsFilename("Document" & DocNo &
".xls", "Excel spreadsheets (*.xls), *.xls", , "Please specifiy file
save location")
    If filesavename = False Then
        'Do something here
    Else
        'Do something else
    End If

The code is supposed to automatically bring up the Save As dialog once
a document has been created by the rest of the code.

Any help would be great,
Carolyn

2. Application.GetSaveAsFilename problem - Excel

3. Application.GetSaveAsFilename question

Why can't I get this to work?  I'm trying to use GetSaveAsFilename to prompt 
the user to save a file using a specific file naming protocol.  Examples of 
what the filename should look like:

GSO C&A PF Jul 09 wk1 bm
VHeathrow C&A PF Dec 09 wk5 lw
Austin C&A PF May 09 wk2 gh

I'm using IFN to set up what the filename should look like then trying to 
set InitialFilename parameter equal to IFN but all I keep getting is "C&A PF 
09 ".  So basically it's picking up everything between ""'s and excluding the 
variables.  How do I get the variables in the assignment?
Private Sub PanicSwitch_Click()
    Dim AUserFile As Variant
    Dim FNwk As String
    Dim FNmonth As String
    Dim FNname As String
    Dim IFN As String
    
    Month7Select = Month7.Value
    MonthRSelect = MonthR.Value
    WeekSelect = Week.Value
    NameSelect = AName.Value
    CenterSelect = Center.Value
    Cells(1, 25) = Month7Select
    Cells(1, 1) = MonthRSelect
    Cells(2, 1) = WeekSelect
    Cells(1, 2) = NameSelect
    Cells(2, 2) = CenterSelect
    Unload NotSoFast
    
    If MonthRSelect = "January" Then FNmonth = Jan
    If MonthRSelect = "February" Then FNmonth = Feb
    If MonthRSelect = "March" Then FNmonth = Mar
    If MonthRSelect = "April" Then FNmonth = Apr
    If MonthRSelect = "May" Then FNmonth = May
    If MonthRSelect = "June" Then FNmonth = Jun
    If MonthRSelect = "July" Then FNmonth = Jul
    If MonthRSelect = "August" Then FNmonth = Aug
    If MonthRSelect = "September" Then FNmonth = Sep
    If MonthRSelect = "October" Then FNmonth = "Oct"
    If MonthRSelect = "November" Then FNmonth = Nov
    If MonthRSelect = "December" Then FNmonth = Dec
    If WeekSelect = "Week 1" Then FNweek = wk1
    If WeekSelect = "Week 2" Then FNweek = wk2
    If WeekSelect = "Week 3" Then FNweek = wk3
    If WeekSelect = "Week 4" Then FNweek = wk4
    If WeekSelect = "Week 5" Then FNweek = wk5
    If NameSelect = "Bishop Minter" Then FNname = bm
    If NameSelect = "Carlos Trespalacios" Then FNname = ct
    If NameSelect = "Dennis Murphy" Then FNname = dm
    If NameSelect = "Gary Hayden" Then FNname = gh
    If NameSelect = "Gloria Montoya" Then FNname = gm
    If NameSelect = "Kenneth Accomando" Then FNname = ka
    If NameSelect = "Lisa Muttillo" Then FNname = lm
    If NameSelect = "Lorraine Warburton" Then FNname = lw
    If NameSelect = "Warner Langlois" Then FNname = wl
    
    IFN = CenterSelect & "C&A PF" & FNmonth & " 09 " & FNweek & " " & FNname
    
    AUserFile = Application.GetSaveAsFilename(InitialFileName:=IFN, 
FileFilter:="Excel Workbooks(*.xls),*.xls", FilterIndex:=1, Title:="You Must 
Save Before You Proceed")
End Sub

4. File save location with Application.GetSaveAsFilename - Excel

5. a question about "Application.GetSaveAsFileName"

Is this method available in Excel from versions 2000 onwards. I am
building an Excel app for a company, and can't remember what version of
Excel I am using (I know I should have checked first).

If not what would be an alternative? method of having a popup dialog
box? (Apart from xldialogSaveAs (spelling!??!) - which seems to be
totally unprogramable.

6. Code equivelent to a key combination? - Excel

7. Convertig Number to Text - equivelent to single quote

I have a list of item numbers that are sent to me from different sources - 
sometimes formatted as number and sometimes formatted as text.  The master 
file I keep for lookup formaula has the items stored as text - with my 
problem being the VLOOKUP formula expecting the values to match, and is not 
giving results all the time.

To cure the issue I can go to the numeric value and type a single quote 
inthe cell preceding the number and this converts it to text and the lookups 
work, but sometimes the list is hundreds of items long, so I am looking for 
an easier way to do this.  Simply highligting the column and formatting all 
values as text does not do the trick - is there a formula that will work that 
I can apply to the cells?  So far I have not had luck with the TEXt and T 
formulas.

Thanks

8. Hour function equivelent help - Excel Functions&Formulas