J
JT
This code will print only file;
CreateObject("Shell.Application").Namespace(0).ParseName("c:\Notes\Note1.snp").InvokeVerb ("&Print")
I am trying to print all snp files and i keep getting error message ("object
variable or With block variable not set"). What am i doing wrong?
Dim strPath As String
Dim strFilter As String
strPath = "c:\Notes\"
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)")
CreateObject("Shell.Application").Namespace(0).ParseName(strPath +
strFilter).InvokeVerb ("&Print")
Function ahtAddFilterItem(strFilter As String, _
strDescription As String, Optional varItem As Variant) As String
If IsMissing(varItem) Then varItem = "*.*"
ahtAddFilterItem = strFilter & _
strDescription & vbNullChar & _
varItem & vbNullChar
End Function
CreateObject("Shell.Application").Namespace(0).ParseName("c:\Notes\Note1.snp").InvokeVerb ("&Print")
I am trying to print all snp files and i keep getting error message ("object
variable or With block variable not set"). What am i doing wrong?
Dim strPath As String
Dim strFilter As String
strPath = "c:\Notes\"
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)")
CreateObject("Shell.Application").Namespace(0).ParseName(strPath +
strFilter).InvokeVerb ("&Print")
Function ahtAddFilterItem(strFilter As String, _
strDescription As String, Optional varItem As Variant) As String
If IsMissing(varItem) Then varItem = "*.*"
ahtAddFilterItem = strFilter & _
strDescription & vbNullChar & _
varItem & vbNullChar
End Function