<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 5.00.3314.2100" name=GENERATOR>
<STYLE>@font-face {
font-family: Tahoma;
}
P.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt
}
LI.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt
}
DIV.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt
}
H2 {
FONT-FAMILY: Arial; FONT-SIZE: 14pt; FONT-STYLE: italic; FONT-WEIGHT: bold; MARGIN: 12pt 0cm 3pt
}
H3 {
FONT-FAMILY: Arial; FONT-SIZE: 13pt; FONT-WEIGHT: bold; MARGIN: 12pt 0cm 3pt
}
H4 {
FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; MARGIN: 3pt 0cm
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm
}
P.Code {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
LI.Code {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
DIV.Code {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
P.code0 {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
LI.code0 {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
DIV.code0 {
FONT-FAMILY: "Courier New"; FONT-SIZE: 12pt; MARGIN: 6pt 0cm 6pt 17.85pt; punctuation-wrap: simple
}
SPAN.emailstyle19 {
COLOR: navy; FONT-FAMILY: Arial
}
SPAN.EmailStyle21 {
COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US link=blue vLink=purple>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003>I found the
below code (Save_DriveJ) on Microsoft. It will open the Save dialog,
<U>Except</U> it does not actually save the same file. When I click on the name
of the file that is placed in the field 'attachments' it is not the same file,
it has the correct title, but it overwrites the text in the file to <SPAN
style="mso-fareast-font-family: 'MS Mincho'">show only the words, Attached
Document.</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'"></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'">Virginia</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'"></SPAN></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'">This is what I put on the command
button on the form:</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'">***********</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'"> Dim strFile As
String</SPAN></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'"> strFile =
GetOpenFile("J:\RCSEAtt\", "Select a File To Attach")</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'"> </SPAN></SPAN></FONT><FONT
face=Arial size=2><SPAN class=770500316-13032003><SPAN
style="mso-fareast-font-family: 'MS Mincho'"><BR> Call
Save_DriveJ<BR> <BR> If CmnDlg.FileName
> " " Then<BR> Attachments = "Attached Document" & "#" &
CmnDlg.FileName & "#"<BR>End If</SPAN></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=770500316-13032003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=770500316-13032003>***************</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003>Function
Save_DriveJ()<BR> Dim X As Integer</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003>
Do<BR> CmnDlg.Action =
2 'save file<BR> If
UCase(Left(CmnDlg.FileName, 1)) <> "J"
Then<BR>
MsgBox "You must save file to drive J
only"<BR>
Else<BR> Exit
Do<BR> End
If<BR> DoEvents<BR>
Loop</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=770500316-13032003> X
= FreeFile<BR> Open CmnDlg.FileName For Output As
#X<BR>
Attachments.SetFocus<BR> Print #X,
Attachments.Text<BR> Close #X<BR> MsgBox
"File has been saved to drive J"<BR></SPAN></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Hollis,Virginia
[mailto:HollisVJ@pgdp.usec.com]<BR><B>Sent:</B> Thursday, March 13, 2003 9:29
AM<BR><B>To:</B> 'accessd@databaseadvisors.com'<BR><B>Subject:</B> RE:
[AccessD] Adding Attachments<BR><BR></DIV></FONT>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940541715-13032003>I
have been playing around with the dialog to Save the file to a specified
folder. Tell me if anyone thinks this will work...</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940541715-13032003>Use
the Open file dialog so the user can select the file they need to attach. Then
the Save dialog box opens to the directory & folder where the
attachment needs to be saved.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940541715-13032003>Once
they save the file it places the file name in the field 'attachments' which is
a hyperlink field.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940541715-13032003>Now,
the problem... (there's always a catch)</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940541715-13032003>How
do I make the Save dialog box actually "Save" the file?! </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940541715-13032003>The
Save dialog opens, and places the file name in the attachments field, but it
does not Save the file to the folder & directory.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=940541715-13032003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=940541715-13032003>Virginia</SPAN></FONT></DIV></BLOCKQUOTE></BODY></HTML>