SaveAs help

From: d. williams (williafn_at_bc.edu)
Date: 03/15/04


Date: Mon, 15 Mar 2004 14:14:46 -0800

hello, all. i've made a template which involves a userform. when the
user clicks 'ok' on the form, i have the form ask if it's ok to save the
file a certain way (as seen in code below). if they hit 'yes', i save
it the way i want. if they hit 'no' what i would like is for the
typical SaveAs dialogue box to pop-up, but with a target location and
filename which i specify.

i've got most of this working, my only snag being popping the SaveAs
dialogue. i haven't been able to find much help googling and i'm not
entirely sure that i *can* pop the standard dialogue from this script.
if it isn't possible to initiate the diaglogue from within the script, i
suppose i can use the information at
http://word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm to intercept
the SaveAs and set what i would like.

i've included the parts of the script i have working. any help is
greatly appreciated! thanks, danny.

---
Dim fileName As String
fName = "W:\" + nameBox.Value + " - " + Format(curDay, "yy-mm-dd") + " 
mohs.doc"
Dim saveMe As Integer
saveMe = MsgBox("Save document as " + fName, 4)
If saveMe = vbYes Then
    MsgBox "Now saving file: " + fName
    ActiveDocument.SaveAs fileName:=fName
Else
    ActiveDocument.SaveAs '???
End If


Relevant Pages

  • Re: SaveAs help
    ... > typical SaveAs dialogue box to pop-up, but with a target location and ... > i've got most of this working, my only snag being popping the SaveAs ... > Dim fileName As String ... > Dim saveMe As Integer ...
    (microsoft.public.word.vba.general)
  • Re: Kids today!
    ... Have a lively drama lesson with teams playing with rolled up newspaper swords and lines from all different characters. ... Show them the SAME DIALOGUE in scenes from the film. ... LOOK at the same dialogue in script form. ... Examine the structure of the play, and the meaning of the imagery. ...
    (alt.sewing)
  • Re: Fail to logon to Exchange with CDO 1.21 under local account
    ... there may be an issue running in the task scheduler ... SQL 2000 and the W2K server where the script resides are separate Windows ... Server and runs under a local account. ... dialogue box with fields for the domain user, ...
    (microsoft.public.exchange.applications)
  • Send-Page-as-eMail, Take III
    ... I suggested using sendkeys to dismiss the saveas ... The "ugly hack" is to set a timer, ... script, onto another thread, to do the job. ... Const bOverwrite = True ...
    (microsoft.public.scripting.vbscript)
  • Re: Windows File Open/Save Dialog
    ... the open and saveas dialogs. ... control, then this is probably the easiest way. ... DynaWrap and/or DynaCall for calling api's directly from script. ...
    (microsoft.public.scripting.vbscript)