|
-
May 3rd, 2004, 08:46 AM
#1
Thread Starter
Frenzied Member
VBA: Show save dialog, with the current directory set to A:
how can i show the save dialog, with the current directory set to A: in microsoft word?.
This is an important task i need to complete for my Unit 4 coursework, but if this isnt possible, i guess i will just get the filename from the "inputbox" function, but i would prefer to allow people to use the word dialog etc....
if anyone can help, i wud b vry appriciative.
-
May 3rd, 2004, 09:23 AM
#2
are you automating Word from VB? or are you using the VBA built into Word?
-
May 3rd, 2004, 03:30 PM
#3
Thread Starter
Frenzied Member
the vba editor in word, i need to add a save to a: function to a toolbar.
-
May 3rd, 2004, 06:38 PM
#4
Thread Starter
Frenzied Member
VB Code:
Option Explicit
Sub SaveToA()
'
' SaveToA Macro
' Macro created 03/05/2004 by Wayne Pearsall
'
With ActiveDocument
' if the current document is not saved
'If .Saved = False Then
' Change the current system directory to the A: drive
ChangeFileOpenDirectory "A:\"
' Call the application to display the "Save As" dialog
' (which should be set at the A: directory)
.SaveAs
'Else
' MsgBox "The current document is already saved!", vbInformation, "Document Saved!"
'End If
End With
End Sub
I have got this code, but for some reason, it doesnt appear to show the save as dialog box, is there something wrong with it,,,?
This is a real important task for my coursework, and is due in tomorrow afternoon, i have worked ma ass of for ages trying to figure it, but :@,,,
Thanks,,,
Wayne
-
May 3rd, 2004, 07:53 PM
#5
Frenzied Member
Would probably get a faster response if you use the VBA Forums
http://vbforums.com/forumdisplay.php?s=&forumid=37
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
|