|
-
Aug 11th, 2005, 08:22 AM
#1
[RESOLVED] Removing File Name From SaveAs Dialog
NeedSomeAnswers posted some code in my last question that allows me to intercept the Save feature of a Word document, and thus, force the user to use SaveAs instead. This is a good thing as I'm using a couple of templates that I made in Word, and do not want the original template overlaid.
However, when they click SaveAs, and the SaveAs dialogbox comes up, the original document name is displayed. How can I wipe that out, and present a SaveAs dialog with nothing in the file name textbox?
-
Aug 11th, 2005, 08:33 AM
#2
Re: Removing File Name From SaveAs Dialog
Hack
Put this in ThisDocument
VB Code:
Sub FileSaveAs()
Dim strFileAs As String
With Application.FileDialog(msoFileDialogSaveAs)
.InitialFileName = ""
.Show
strFileAs = .SelectedItems.Item(1)
End With
ActiveDocument.SaveAs strFileAs
End Sub
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Aug 11th, 2005, 10:40 AM
#3
Re: Removing File Name From SaveAs Dialog
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Aug 11th, 2005, 12:02 PM
#4
Re: [RESOLVED] Removing File Name From SaveAs Dialog
Works like a champ. Thank you Danny.
This makes two routines I've copied and pasted into my word document, and I added an error trap all by myself. (Damn I'm good )
RobDog888: You better watch out buddy, there is a new VBA guru in town!
-
Aug 11th, 2005, 01:25 PM
#5
Re: [RESOLVED] Removing File Name From SaveAs Dialog
Yes, DMK is quite good but I still rule Office VBA I'm a Leo, remember? King of the Office VBA jungle. 
Soon as I get back from building my block wall there will be a new RobDog888 to watch out for.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 11th, 2005, 01:30 PM
#6
Re: [RESOLVED] Removing File Name From SaveAs Dialog
Actually, in a tongue-in-cheek fashion, I was referring to me as the new VBA guru 'cause I copied and pasted two routines I didn't write into a document.
-
Aug 11th, 2005, 01:31 PM
#7
-
Aug 11th, 2005, 01:35 PM
#8
Re: [RESOLVED] Removing File Name From SaveAs Dialog
He he, either way its great to see the VBA forum packing some decent traffic after all my longs moinths of building it up from < 30 threads a month to 200+ threads a month. Thanks to all who help post in VBA.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 11th, 2005, 01:41 PM
#9
Re: [RESOLVED] Removing File Name From SaveAs Dialog
Yep..
People under estimate VBA.. some of the stuff I can do with it (Until MSDN Sub my company wouldn't let use anything other than office) will blow your mind..
I'll be around to help as many as I can for some time
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|