![]() |
#4
|
||||
|
||||
![]()
Doug Robbins posted a macro a long time ago that gives us the basic code which can be adapted to your requirements. I've added an arbitrary limit so your default filename doesn't get too long.
Code:
Sub FeedMeSeymour() Dim fd As FileDialog Set fd = Application.FileDialog(msoFileDialogSaveAs) With fd .InitialFileName = Left(Selection.Text, 50) If .Show <> 0 Then 'if the user didn't press the cancel button .Execute End If End With Set fd = Nothing End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Swarup | Word | 11 | 07-26-2022 01:51 PM |
![]() |
mrplastic | Word VBA | 4 | 12-20-2019 01:25 PM |
![]() |
rosscortb | Word VBA | 5 | 03-08-2018 04:30 AM |
Save Document as Text File | gerison | Word VBA | 5 | 11-27-2017 07:15 AM |
![]() |
jabberwocky12 | Word VBA | 2 | 10-22-2010 12:23 PM |