Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2014, 06:09 AM
KSP KSP is offline VBA save a NEW unsave document without prompting user for a file name Windows 7 32bit VBA save a NEW unsave document without prompting user for a file name Office 2007
Novice
VBA save a NEW unsave document without prompting user for a file name
 
Join Date: Aug 2014
Posts: 3
KSP is on a distinguished road
Default VBA save a NEW unsave document without prompting user for a file name


Using VBA how can I save a new document to a directory without promting the user for a flie name. The document has not been saved before. I am trying to save a newly created merged document.
Reply With Quote
  #2  
Old 08-31-2014, 06:54 AM
macropod's Avatar
macropod macropod is offline VBA save a NEW unsave document without prompting user for a file name Windows 7 64bit VBA save a NEW unsave document without prompting user for a file name Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

See 'Send Mailmerge Output to Individual Files' and 'Split Merged Output to Separate Documents' in: https://www.msofficeforums.com/mail-...ps-tricks.html. The code for 'Send Mailmerge Output to Individual Files' saves the file to the same folder as the mailmerge main document and the code for 'Split Merged Output to Separate Documents' saves the file to the same folder as the source document, respectively, but you could specify a different folder.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-31-2014, 07:39 AM
gmayor's Avatar
gmayor gmayor is offline VBA save a NEW unsave document without prompting user for a file name Windows 7 64bit VBA save a NEW unsave document without prompting user for a file name Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If you are not going to ask the user for the name, where do you propose getting the name from?

In addition to Paul's link, if this is a mailmerge then you can name the individual documents from the merge data, using one of three merge tools available from my web site e.g. http://www.gmayor.com/individual_merge_letters.htm or alternatively http://www.gmayor.com/MergeAndSplit.htm makes it pretty simple to merge just one record named from the file, but someone has got to provide a name before you can save.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #4  
Old 09-01-2014, 07:30 AM
KSP KSP is offline VBA save a NEW unsave document without prompting user for a file name Windows 7 32bit VBA save a NEW unsave document without prompting user for a file name Office 2007
Novice
VBA save a NEW unsave document without prompting user for a file name
 
Join Date: Aug 2014
Posts: 3
KSP is on a distinguished road
Default

I will provide the directory and name for the file. I cannot believe that this has not been done before.
Reply With Quote
  #5  
Old 09-01-2014, 03:31 PM
macropod's Avatar
macropod macropod is offline VBA save a NEW unsave document without prompting user for a file name Windows 7 64bit VBA save a NEW unsave document without prompting user for a file name Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Both Graham and I have provided you with links to code showing you the general principles. For anyone even moderately competent in VBA it's hardly rocket science. Have you at least examined the code?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 09-02-2014, 01:42 PM
KSP KSP is offline VBA save a NEW unsave document without prompting user for a file name Windows 7 32bit VBA save a NEW unsave document without prompting user for a file name Office 2007
Novice
VBA save a NEW unsave document without prompting user for a file name
 
Join Date: Aug 2014
Posts: 3
KSP is on a distinguished road
Default

I examined the code and found what I was looking for, tested it, and it worked!!!

Sincerely,

Grasshopper
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA save a NEW unsave document without prompting user for a file name How can I save a Word Document as a PDF file with a merged field filename? kp2009 Word VBA 5 08-27-2015 11:45 PM
VBA save a NEW unsave document without prompting user for a file name Force User to Save As lgillespie Word 6 09-09-2013 03:13 PM
VBA save a NEW unsave document without prompting user for a file name Macro to create new word doc and save the file using String found in the document VBNation Word VBA 2 02-08-2013 07:14 AM
Outlook 2007 prompting to save attachments when they have been closed for hours Bamlaw Outlook 0 09-06-2012 03:13 PM
Print to PDF without prompting for file name tpluta PowerPoint 0 10-07-2010 08:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:13 AM.


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