Attaching an attachment using a certain location

S

stevehorton

Hi there,

I have code that will send an email from lotus notes and then attach a
attachment.

Currently it will just open the "open file" screen and you have to fin
it from there.

My question is..... is it possible to code so it opens the same scrre
but has already gone to a specific folder.

e.g i click the button, it opens the "open file" screen and is alread
in a folder i.e c:\sch

my current code...

Private Function GetAttach() As String
Dim strFileFullPath As String

strFileFullPath = Application.GetOpenFilename("Xl Files (*.xls)
*.xls")
If strFileFullPath = "False" Then Exit Function
GetAttach = strFileFullPath
MsgBox ("Your email has been sent to an approver, expect confirmatio
of approval soon")
End Functio
 
R

Ron de Bruin

Hi stevehorton

Dim MyPath As String
Dim SaveDriveDir As String

SaveDriveDir = CurDir
MyPath = "c:\sch"

ChDrive MyPath
ChDir MyPath

'Your code


ChDrive SaveDriveDir
ChDir SaveDriveDir
 
Top