Good afternoon, all. Thanks for taking a moment to review my issue.
I've got a little bit of code that I located online that captures the active screen so the Supervisors have a "scorecard" they can use in discussions with the reps. Once my application completes that sub, it creates a Word document and pastes the screen capture and saves it to the Supervisor's Documents folder. The code works flawlessly for me in testing, but whenever any of the Supervisors use it, Access throws a code at line 1027:
Code:
1021 FilePath = "C:\users\" & Environ("USERNAME") & "\Documents\"
1022 FileName = cboEmployeeName & " " & cboMonth & " " & cboYear & " Scorecard.docx"
1023 'ScreenCapture 'this code captured all monitors
1024 PrintScreen 'this code captures just the active monitor
1025 Set appWord = CreateObject("Word.Application")
1026 appWord.Documents.Add
1027 appWord.Selection.Paste
1028 appWord.ActiveDocument.SaveAs FileName:=FilePath & FileName, FileFormat:=wdFormatDocument
1029 appWord.Quit
I hope I've presented my problem sufficiently. Any help would be appreciated.
Make it a great day!