Printing query results or imported Excel data

  • Thread starter spawnss via AccessMonster.com
  • Start date
S

spawnss via AccessMonster.com

Hello everyone. I have some exported PDF files from an Electronic Document
Managemet Software (EDMS). They are about 1000. All of them in same folder
and they have document numbers. Also I have list of document numbers about
100. My list is containing some of the exported PDF documents from same EDMS
with same document numbers. Is there anyway to print the documents which in
my list using Access? I mean if I import my list into Access and if I make a
query, can Access print the listed documents which in my query? I searched
from and I found below code to print documents.

Shell Chr(34) & "FullPathofAcrobat.exe" & Chr(34) & " /p " & _ Chr(34) &
"FullPathofFiles" & Chr(34), vbMinimizedFocus

Can I use this code to print my files?

Or is there anyway to copy the documents that I want to print from one folder
to another folder so I can make one PDF file from them and I can print?

Thank you for your help.
Regards,
Oguz
 
S

spawnss via AccessMonster.com

I found below code for copy files to another folder in forum. But if you have
a code for printing it would be more helpful. Thank you.

Private Sub Command1_Click()
Dim strFileName As String
Dim strSourcePath As String
Dim strTargetPath As String
Dim rst As Recordset

Set rst = CurrentDb.OpenRecordset("9kadinfomatch")

If rst.RecordCount = 0 Then
MsgBox "No Isos Found"
Else
strSourcePath = "D:\isos\"
strTargetPath = "D:\selectedisos\"

With rst
.MoveLast
.MoveFirst
Do While Not .EOF
strFileName = ![DWG NO] & "r00" & ![Version] & ".pdf"
FileCopy strSourcePath & strFileName, strTargetPath &
strFileName
Loop
End With
rst.Close
Set rst = Nothing
End If
End Sub
 
S

spawnss via AccessMonster.com

Opps! Problem again. This code copies only first records not all. How can I
revise it to copy all listed documents?
I found below code for copy files to another folder in forum. But if you have
a code for printing it would be more helpful. Thank you.

Private Sub Command1_Click()
Dim strFileName As String
Dim strSourcePath As String
Dim strTargetPath As String
Dim rst As Recordset

Set rst = CurrentDb.OpenRecordset("9kadinfomatch")

If rst.RecordCount = 0 Then
MsgBox "No Isos Found"
Else
strSourcePath = "D:\isos\"
strTargetPath = "D:\selectedisos\"

With rst
.MoveLast
.MoveFirst
Do While Not .EOF
strFileName = ![DWG NO] & "r00" & ![Version] & ".pdf"
FileCopy strSourcePath & strFileName, strTargetPath &
strFileName
Loop
End With
rst.Close
Set rst = Nothing
End If
End Sub
 
S

spawnss via AccessMonster.com

I kow looks like I'm solving my own problems but below problem is sorted out.
I just read below code's messages again and found out. Just put rst.movenext
in loop. Sorry.
Opps! Problem again. This code copies only first records not all. How can I
revise it to copy all listed documents?
I found below code for copy files to another folder in forum. But if you have
a code for printing it would be more helpful. Thank you.
[quoted text clipped - 26 lines]
End If
End Sub
 

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