Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-22-2013, 08:37 PM
WyRm WyRm is offline Adding a Save button into a document Windows 7 64bit Adding a Save button into a document Office 2010 64bit
Novice
Adding a Save button into a document
 
Join Date: Mar 2013
Posts: 7
WyRm is on a distinguished road
Default Adding a Save button into a document

So i was looking through the forum and a total newbie to advance stuff with office. I found this but not sure what to do to edit it for my needs.
Code:
Private Sub Document_New()
Dim StrName As String, StrDefPath As String, StrTmpPath As String
StrName = Environ("UserName") & Format(Now, "YYYYMMDD")
StrTmpPath = "Filepath for documents based on this template"
StrDefPath = Options.DefaultFilePath(wdDocumentsPath)
Options.DefaultFilePath(wdDocumentsPath) = StrTmpPath
With Application.Dialogs(wdDialogFileSaveAs)
  .Name = StrName
  .Show
End With
Options.DefaultFilePath(wdDocumentsPath) = StrDefPath
End Sub
I want to make it so it uses a particular line and the date as the saving format.

ex. One of the lines in the form is Residence:

So would like when they press the save button it would save the file as



Residence Date.doc

Can this be down and for the path's do I put in the actual path like c:\user\temp\Documents\forms

Thanks in advance

Last edited by macropod; 03-22-2013 at 10:12 PM. Reason: Added code tags & formatting
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Save button into a document Command button - save in temp folder and send email with attachment bigbird69 Word VBA 13 11-18-2012 10:06 PM
Adding a Save button into a document Command Button will not work when document is protected brockjensen Word 1 11-02-2012 06:59 PM
Word ask to save template whenever i save a derived document jorbjo Word 3 10-04-2012 10:52 AM
Adding a Save button into a document Adding email button to Word form leilers Word 5 01-09-2012 03:21 PM
Adding an Email Button to a Word Document maddoktor Word 0 12-01-2011 01:32 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft