C
carriey
I have been using DH QBF by Duane Hookom for quite some time now and it works
great. Mostly my users export to Excel.
I seem to remember quite a long time ago that I had received some help on
how to modify it to have the memo fields export the full text instead of 255
characters and I haven't changed anything but have been notified that it is
truncating the text.
I think where I need to make a change is in the part pasted below but I'm
not really sure. Is there anyone out there that can help me?
Thank you!!!!
=====
On Error GoTo cmdSend_Click_Err
Dim strErrMsg As String 'For Error Handling
Dim strFile As String
Dim strSendTo As String
Dim varRet
If Me.grpSendTo <> 1 And Len(Me.txtFileName & "") = 0 Then
MsgBox "You must provide a file name.", vbOKOnly + vbInformation, "No
File Name"
Me.txtFileName.SetFocus
Exit Sub
End If
Select Case Me.grpSendTo
Case 1
DoCmd.OpenQuery "myquery", acViewPreview
Exit Sub
Case 2
strSendTo = acFormatRTF
Case 3
strSendTo = acFormatXLS
Case 4
strSendTo = acFormatTXT
Case 5
strSendTo = acFormatHTML
Case 6
DoCmd.TransferText acExportDelim, , "myquery", Me.txtFileName,
Me.chkIncludeHeadings
If Me.chkAutoStart Then
varRet = Shell("Notepad " & Me.txtFileName, vbNormalFocus)
End If
Exit Sub
Case 7
DoCmd.OpenForm "frmQBFGraph", , , , , acDialog
Exit Sub
Case 8
' Commented out 7/10/2003 by Duane Hookom - Nestle US - Nutrition
Division
FixExtension
strFile = Me.txtFileName
Dim strNewFile As String
strNewFile = Left(strFile, InStr(strFile, ".") - 1) & ".DOC"
DoCmd.TransferText acExportDelim, , "myquery", strFile,
Me.chkIncludeHeadings
Kill strNewFile
Name strFile As strNewFile
If Me.chkAutoStart Then
Dim oApp As Object 'New Word.Application
Dim oDoc As Object 'New Word.Document
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Set oDoc = oApp.Documents.Add
'oApp.Documents.Add
oDoc.MailMerge.OpenDataSource Name:=strNewFile, Format:=0,
ConfirmConversions:=True
'oApp.MailMerge.DataSource = Me.txtFileName
MsgBox "You can now switch applications to Word to create your
merge document", vbOKOnly + vbInformation, "Merge Ready"
End If
Exit Sub
Case Else
MsgBox "You must select a Send To option", vbOKOnly +
vbInformation, "Send To Error"
Me.grpSendTo.SetFocus
Exit Sub
End Select
DoCmd.OutputTo acOutputQuery, "myquery", strSendTo, Me.txtFileName,
Me.chkAutoStart
great. Mostly my users export to Excel.
I seem to remember quite a long time ago that I had received some help on
how to modify it to have the memo fields export the full text instead of 255
characters and I haven't changed anything but have been notified that it is
truncating the text.
I think where I need to make a change is in the part pasted below but I'm
not really sure. Is there anyone out there that can help me?
Thank you!!!!
=====
On Error GoTo cmdSend_Click_Err
Dim strErrMsg As String 'For Error Handling
Dim strFile As String
Dim strSendTo As String
Dim varRet
If Me.grpSendTo <> 1 And Len(Me.txtFileName & "") = 0 Then
MsgBox "You must provide a file name.", vbOKOnly + vbInformation, "No
File Name"
Me.txtFileName.SetFocus
Exit Sub
End If
Select Case Me.grpSendTo
Case 1
DoCmd.OpenQuery "myquery", acViewPreview
Exit Sub
Case 2
strSendTo = acFormatRTF
Case 3
strSendTo = acFormatXLS
Case 4
strSendTo = acFormatTXT
Case 5
strSendTo = acFormatHTML
Case 6
DoCmd.TransferText acExportDelim, , "myquery", Me.txtFileName,
Me.chkIncludeHeadings
If Me.chkAutoStart Then
varRet = Shell("Notepad " & Me.txtFileName, vbNormalFocus)
End If
Exit Sub
Case 7
DoCmd.OpenForm "frmQBFGraph", , , , , acDialog
Exit Sub
Case 8
' Commented out 7/10/2003 by Duane Hookom - Nestle US - Nutrition
Division
FixExtension
strFile = Me.txtFileName
Dim strNewFile As String
strNewFile = Left(strFile, InStr(strFile, ".") - 1) & ".DOC"
DoCmd.TransferText acExportDelim, , "myquery", strFile,
Me.chkIncludeHeadings
Kill strNewFile
Name strFile As strNewFile
If Me.chkAutoStart Then
Dim oApp As Object 'New Word.Application
Dim oDoc As Object 'New Word.Document
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Set oDoc = oApp.Documents.Add
'oApp.Documents.Add
oDoc.MailMerge.OpenDataSource Name:=strNewFile, Format:=0,
ConfirmConversions:=True
'oApp.MailMerge.DataSource = Me.txtFileName
MsgBox "You can now switch applications to Word to create your
merge document", vbOKOnly + vbInformation, "Merge Ready"
End If
Exit Sub
Case Else
MsgBox "You must select a Send To option", vbOKOnly +
vbInformation, "Send To Error"
Me.grpSendTo.SetFocus
Exit Sub
End Select
DoCmd.OutputTo acOutputQuery, "myquery", strSendTo, Me.txtFileName,
Me.chkAutoStart