Ok, here’s the issue. I need to save files on a user’s local machine as attachments to a web page without user intervention. I’m not worried about using an unsigned or unsafe ActiveX control, since this will be on an internal app where our domain is a trusted site for users. I’ve tried many other approaches, but I believe ActiveX would be the best. I’m stuck, though, after getting a handle on a file how can I actually call the file to be saved to the web document? Below is my code at where I’m at along with further explaination below:
Sub getImageFile()
Set fso = CreateObject( “Scripting.FileSystemObject” )
fileFolderTemp = fileNameTemp & “_files”
Set fileFolder = fso.GetFolder( fileFolderTemp )
Set fileCollection = fileFolder.Files
For Each fileTemp in fileCollection
if (InStr(LCase(fileTemp.name), ".jpg") Or InStr(LCase(fileTemp.name), ".gif")) Then
fileNameTemp = "c:\" & document.all.UniqueID.value & "_files\" & fileTemp.name
//Set fso1 = CreateObject( "Scripting.FileSystemObject" )
//Set MyFile = fso.GetFile( fileNameTemp )
MyFile.Copy ("c:\temp\" & fileTemp.name )
End if
Next
End Sub
I’m basically checking a folder for .gif and .jpg files and if they match I need these attached to the document.
As you can see, I have a handle on the file and I can even use an ActiveX method to save it to another location, and it works. However, my question and intent is, how would I actually go about calling the file to be saved to the document I’m in.?
Any ideas? Any suggestions? Any and all help is greatly appreciated. Thanks for all of it.
<<<>>>