Create File

N

Neil

I am developing a training package in powerpoint. I intend to have users enter their name and answer questions in the presentation. I would like to record the users name and how they answered the questions. I can use command buttons and inputbox's and store various things as variables while the user progresses through the presentation. What I am having trouble with is creating the file. I have included some code of how i created a file (text file) in excel. For some reason it does not work in Powerpoint. Can some one assit me please.

Dim myCriteria As String
Dim myOutText As String
Dim tmpfileName As String
SavDir = Application.GetTempName(FileNameIB, "Text Files (*.txt), *.txt")
If SavDir = False Then
NoSave = MsgBox("No text file has been created!", vbCritical, "Cancelled")
End
Else
tmpfileName = SavDir
'Open tmpfileName For Output As #1 - to clear and start fresh
Open tmpfileName For Append Access Write As #1
myOutText = "FileName: " & FileNameIB _
& vbNewLine & "Name: " & NameIB _
& vbNewLine & "Date: " & Date
Write #1, myOutText
Close #1
Finish = MsgBox("The following text file has been created, " & SavDir & ".", vbInformation, "Complete")
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top