#1
|
|||
|
|||
PDF default path
Hello,
Iīm looking for a macro to save the file as PDF in default folder. I was able to save as pdf but not insert and work the default folder in the VBA. Thanks |
#2
|
||||
|
||||
What is the code you're using?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Sub Save_to_PDF()
' ' Save_to_PDF Macro ' ' With Dialogs(wdDialogFileSaveAs) .Format = wdFormatPDF .Show End With End Sub I donīt know how to add a default path |
#4
|
||||
|
||||
You might try inserting:
.Name = Options.DefaultFilePath(wdDocumentsPath) & "\" & ActiveDocument.Name before: .Format = wdFormatPDF In some Word versions, at least, wdDocumentsPath is unstable and returns whatever the current path is rather than the default path.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
I want to setup the the defaul path
|
#6
|
||||
|
||||
In that case replace:
Options.DefaultFilePath(wdDocumentsPath) with whatever your ''default' path is. I'd have thought that was pretty obvious.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Sorry, maybe my english is not. Well, honestly is not good.
I recorded a video https://www.screencast.com/t/Q3t7PhHv7 The problem is how to set a default folder to save the file. |
#8
|
||||
|
||||
If you want to set a default save path, you could use:
Options.DefaultFilePath(wdDocumentsPath) = "C:\" replacing "C:\" with whatever your preferred path is. You don't need the 'SaveAs' dialogue for that.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
It works. Thanks a lot.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turn OFF auto-adding file path as default alternative text for inserted objects | Sergey SPb | Drawing and Graphics | 7 | 04-24-2017 11:25 PM |
Change old path to new path (batch) | NobodysPerfect | Word VBA | 2 | 08-14-2014 10:09 PM |
Publisher '07--default file path | markg2 | Publisher | 0 | 02-15-2014 10:22 AM |
Modify default template to include file path | jacl | Excel | 1 | 03-26-2011 10:24 AM |
How i can change default signature path? | d4rqu | Outlook | 0 | 10-20-2009 02:08 AM |