-
May 3rd, 2012, 12:49 AM
#1
New Member
Copy paste error
Hi,
I'm trying to copy a picture from one location and paste it into another location however VB throws out the following error
Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)
both locations are on my local computer. So not sure what is causing the problem.
Here's the code
Module CPASU_SPC
Sub Main()
Console.Title = "MOARW Programs"
Console.WriteLine("Begin Application" & vbLf)
Console.Beep()
Console.ReadLine()
Dim objFSO
Dim CPASU_Journal, vSharePoint, fsoSource, fsoDest
objFSO = CreateObject("Scripting.FileSystemObject")
CPASU_Journal = "C:\XX\XXX\Documents\Team docs\JMP Analysis\HTML"
vSharePoint = "C:\XXX\XX\Documents\Team docs\JMP Analysis\Sample"
Console.WriteLine("Begin pic upload... " & vbLf)
fsoSource = CPASU_Journal & "\gfx\Image1.png"
fsoDest = vSharePoint
Console.Write(fsoSource)
Console.Write(fsoDest)
objFSO.CopyFile(fsoSource, fsoDest)
Kill(fsoSource)
End Sub
End Module
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules