Option Compare Database
' add constant for each slide/file
Const tgt_file = "H:\NewDatabase\MPF1.rtf"
Const tgt_file1 = "H:\NewDatabase\Depord.rtf"
Dim ppt_file As Text
' ppt_file = "G:/I_and_L/LX/26APR02Right.ppt"
Const pp = "C:\Progra~1\Micros~1\Office\Powerpnt.exe"
'------------------------------------------------------------
' OutputMPFReport
'
'------------------------------------------------------------
Sub OutputReport()
Let ppt_file = Text1
' IF THEN statement for each file => Kill
If Dir(tgt_file) <> "" Then
Kill (tgt_file)
End If
If Dir(tgt_file1) <> "" Then
Kill (tgt_file1)
End If
' add on DoCmd line for each slide (file)
DoCmd.OutputTo acReport, "MPF1", "RichTextFormat(*.rtf)", tgt_file, False, ""
DoCmd.OutputTo acReport, "Depord.rtf", "RichTextFormat(*.rtf)", tgt_file1, False, ""
Call Shell(pp & " " & ppt_file, 1)
End Sub
ok the thing is it keeps giving me an error at the begining of the run saying that the user defined type not defined...
uh if its user defined, then isnt it defined?