Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Change the behavior of "Save Frame As"?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
plh - 17 Feb 2007 13:26 GMT
Office 2003:
We have a system whereby sales engineers create spec. sheet by filling out the
left frame in a read-only two-frame document (the right frame containing
instructions) then using RightClick/Save Frame As to save the resulting spec.
sheet under a new name.  What we would like to do is have the Save As dialog
window, instead of showing the same folder where the original document resides
and the suggested name "Document1.doc", default to a folder and suggested file
name predetermined by information contained in fields on the frame. My guess is
that this can be done through a custom .dot, but I would greatly appreciate some
help getting started. I am new to VBA in Word but have extensive experience with
it in Excel and Access. I have looked at the SaveAs Method and DefaultSaveFormat
Property in help but my questions are:
1) How to change the default folder. I see the part about the file name (SaveAs
Method). Can I use a drive\path\name in that parameter such as
"I:\Shared\Marketing\Smith\COPs\23456Specs.doc"
2) How to make this happen in response to RightClick/Save Frame As.
Thank You,
plh

Signature

Where are we going and why am I in this HAND BASKET??

Jean-Guy Marcil - 19 Feb 2007 16:14 GMT
plh was telling us:
plh nous racontait que :

> Office 2003:
> We have a system whereby sales engineers create spec. sheet by
[quoted text clipped - 16 lines]
> Thank You,
> plh

You can highjack the SaveFrameAs command with a sub that uses the exact name
as in this example:
Make sure you store the Sub in the project associated with the frame in the
VBA Editor.

'_______________________________________
Sub FileSaveFrameAs()

Dim strUserPAth

'Save user current directory
strUserPAth = CurDir

'Do the save
With Dialogs(wdDialogFileSaveAs)
   .Name = "I:\Shared\Marketing\Smith\COPs\"
   .Show
End With

'Reset the open/save directory
Application.ChangeFileOpenDirectory strUserPAth

End Sub
'_______________________________________

If you want to use a file name as well as a path name, change

       .Name = "I:\Shared\Marketing\Smith\COPs\"

to

       .Name = "I:\Shared\Marketing\Smith\COPs\MyDocument.doc"

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

plh - 19 Feb 2007 17:28 GMT
>plh was telling us:
>plh nous racontait que :
[quoted text clipped - 52 lines]
>
>        .Name = "I:\Shared\Marketing\Smith\COPs\MyDocument.doc"

Dear Jean-Guy,
Thank you, we will try it!
-plh

Signature

Where are we going and why am I in this HAND BASKET??

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.