Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Other Languages
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
Other Languages
Problem in saving a Presentation using VBA Macro
Parth Pateld
Greenhorn
Posts: 29
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
I have written a macro in PowerPoint .pptx file, which fires when ever a user Press on 'Save' button and SaveAs Dialog will appear.
And Filename in SaveAs dialog box will be coming automatically and appending Time step to that file.
But I can not save that Presentation.
Follow is my code:
Private Sub PPTEvent_PresentationBeforeSave(ByVal Pres As Presentation, Cancel As Boolean) Dim dlgSaveAs As FileDialog Dim strMyFile As String Dim strTmp As String Set dlgSaveAs = Application.FileDialog(Type:=msoFileDialogSaveAs) strMyFile = "Title" & "_" & "SubTitle" strTmp = strMyFile & Format(Date, "yyyy_mm_dd") With dlgSaveAs .InitialFileName = strMyFile & Format(Date, "yyyy_mm_dd") If .Show = -1 Then strTmp = .SelectedItems(1) MsgBox (strTmp) ' Error comes at this point, Error : Run Time Error - 2147467259 (80004005) Presentation (Unknown Number) Pres.SaveAs FileName:=strTmp, FileFormat:=ppSaveAsDefault strTmp = strMyFile '-- save your file to strMyFile here Else Cancel = True MsgBox "File was not saved." '-- The user pressed Cancel. End If End With Set dlgSaveAs = Nothing Set cPPTObject.PPTEvent = Nothing End Sub
Zeeshan Sheikh
Ranch Hand
Posts: 144
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What Visual basic Application (Scripting) has to to with
Java
Language ?? Hint Hint !!! Wrong Forum
MySQL Blog
http://mysqlearner.blogspot.com/
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
raw xml as the payload
Problem in communication bet'n vb client and java server
Word Macros doesnt works when using JRun as a Service
Save a query to a string
JfileChooser selecting existing file.......?
More...