Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-26-2015, 04:06 PM
Macer Macer is offline Can DocumentBeforeSave replace FileSaveAs Windows 7 64bit Can DocumentBeforeSave replace FileSaveAs Office 2007
Novice
Can DocumentBeforeSave replace FileSaveAs
 
Join Date: Jan 2015
Posts: 9
Macer is on a distinguished road
Default Can DocumentBeforeSave replace FileSaveAs

This is probably a long shot but I was wondering if there was a way that I could use Documentbeforesave() to work like FileSaveAs() and FileSave() events. My code for those events did work until we transferred to Office 2013. I was using FileSaveAs and FileSave to save a file then run the my code afterward. My code needs to be afterward because it tracks file locations and logs it in another file. Since DocumentBeforeSave runs on any type of save, I was thinking I need logic kind of like the following. Sub DocumentBeforeSave()| If SaveAs was selected| Run SaveAs| Run my Macro| Prevent SaveAs from running| again. Exit Sub | else If Save was selected | Run Save | Run my Macro | Prevent Save from running again. | Exit else End Sub | Is it possible to do this or am I just trying to create the impossible.

Last edited by Macer; 02-27-2015 at 02:56 PM.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can DocumentBeforeSave replace FileSaveAs DocumentBeforeSave Event doesn't apply to all exports to PDF ARK275 Word VBA 3 02-09-2015 07:06 AM
Can DocumentBeforeSave replace FileSaveAs VBA Batch Find & Replace for all MSOffice extensions, to replace File Name and Content of the File QA_Compliance_Advisor Word VBA 11 09-11-2014 11:51 PM
Can DocumentBeforeSave replace FileSaveAs Help with find and replace or query and replace shabbaranks Excel 4 03-19-2011 08:38 AM
filesaveas method for ms project in c# results in error mikimik Project 0 10-12-2006 07:53 AM
FileSaveAs with Code bsmith Office 0 01-05-2006 08:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:06 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