Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2015, 04:50 PM
LOUF LOUF is offline Macro: How to get this macro to save to a specific location Windows 7 64bit Macro: How to get this macro to save to a specific location Office 2013
Novice
Macro: How to get this macro to save to a specific location
 
Join Date: Dec 2015
Location: California
Posts: 1
LOUF is on a distinguished road
Default Macro: How to get this macro to save to a specific location

Hi all! The macro below does a great job of saving a PDF (and overriding changes) to the same original location where the Word document lives, but how can I tell it to save to a specific location on my network?

The purpose of this would be to distribute the Word doc to colleagues in various departments and have them all save a PDF version of the working doc in a specific folder, each overriding a previous PDF:

Sub Silent_save_to_PDF()
'
' Silent Save_to_PDF Macro
'
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
Replace(ActiveDocument.FullName, ".docx", ".pdf"), _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, Item:= _
wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=True, _


CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
End Sub

Many thanks!
Reply With Quote
  #2  
Old 12-07-2015, 06:47 PM
macropod's Avatar
macropod macropod is offline Macro: How to get this macro to save to a specific location Windows 7 64bit Macro: How to get this macro to save to a specific location Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Change:
Replace(ActiveDocument.FullName, ".docx", ".pdf")
to:
"Some Path\" & Replace(ActiveDocument.Name, ".docx", ".pdf")
where 'Some Path' is the designated path.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro: How to get this macro to save to a specific location Macro to save as pdf with ability to choose save as folder rvessio Word VBA 4 07-25-2016 12:37 PM
Macro Needed to bold specific lines and Macro to turn into CSV anewteacher Word VBA 1 05-28-2014 03:59 PM
Macro: How to get this macro to save to a specific location can I run a macro when I open a specific doc ?? ximpostor Word VBA 10 10-12-2012 12:35 PM
can I run a macro when I open a specific doc. shreked Word 8 01-12-2012 03:36 AM
Macro Location eliz.bell Word 0 10-05-2009 07:44 PM

Other Forums: Access Forums

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