PRB: The CopyFile Method Does Not Work for Printer DeviceName with Spaces on NT (252607)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0, when used with:
- the operating system: Microsoft Windows NT
- the operating system: Microsoft Windows 2000
- Microsoft Visual Basic Learning Edition for Windows 6.0, when used with:
- the operating system: Microsoft Windows NT
- the operating system: Microsoft Windows 2000
- Microsoft Visual Basic Professional Edition for Windows 5.0, when used with:
- the operating system: Microsoft Windows NT
- the operating system: Microsoft Windows 2000
- Microsoft Visual Basic Professional Edition for Windows 6.0, when used with:
- the operating system: Microsoft Windows NT
- the operating system: Microsoft Windows 2000
- Microsoft Visual Basic Enterprise Edition for Windows 5.0, when used with:
- the operating system: Microsoft Windows NT
- the operating system: Microsoft Windows 2000
- Microsoft Visual Basic Enterprise Edition for Windows 6.0, when used with:
- the operating system: Microsoft Windows NT
- the operating system: Microsoft Windows 2000
This article was previously published under Q252607 SYMPTOMS
When a file is copied to the network printer with the CopyFile method of the FileSystemObject object, and the printer DeviceName contains a space, the following error occurs:
Runtime error 52: Bad file name or number
RESOLUTION
If you have administrative privileges on the server, rename the printer so that the DeviceName is one word without spaces in it.
REFERENCES154078 HOWTO: Send Raw Data to a Printer Using the Win32 API from VB
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbprb kbprint KB252607 |
---|
|