Hi,
I have been trying to email a report from a form in rtf format. As many of the posts discuss - its better to use a mail merge to keep formatting, graphics together etc. I only have text boxes on my form and have two larger fields that have 'can grow' set to yes. when the report is converted to rtf some of these larger fields are truncated.
I have tried to remedy this by making the fields larger, removing bold etc etc. I am still getting knowhere fast so have tried to alter some code i found and it doesn't work. I'm not a programmer so have no idea what I am doing....
Help would be greatly appreciated!
Cath
ps here is the code so far - It doesn't get past the third line, let alone the rest of it....
Private Sub MergeButton_Click()
On Error GoTo MergeButton_Err
Dim objWord As Word.Application
'Start Microsoft Word 97.
Set objWord = CreateObject("Word.Application")
With objWord
'Make the application visible.
.Visible = True
'Open the document.
.Documents.Open ("U:\FLR\SHARED-FLR3-A\Pdg\Pdg Data\wdfiles\80000\80232\Technical Assistant\Tender Queries\DMSMerge.doc")
'Move to each bookmark and insert text from the form.
.ActiveDocument.Bookmarks("Date").Select
.Selection.Text = (CStr(Froms![Consultant Query]![Actual Date]))
End With
'Print the document in the foreground so MS Word 97 wont close until the doc
'finishes printing.
objWord.ActiveDocument.PrintOut Background:=False
'Close the document without saving changes.
objWord.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
'Quit MS Word 97 and release the object variable.
objWord = Nothing
Exit Sub
MergeButton_Err:
'If a field on the form is empty
'remove the bookmark text and continue.
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
Else
MsbBox Err.Number & vbCr & Err.Description
End If
Exit Sub
End Sub
I have been trying to email a report from a form in rtf format. As many of the posts discuss - its better to use a mail merge to keep formatting, graphics together etc. I only have text boxes on my form and have two larger fields that have 'can grow' set to yes. when the report is converted to rtf some of these larger fields are truncated.
I have tried to remedy this by making the fields larger, removing bold etc etc. I am still getting knowhere fast so have tried to alter some code i found and it doesn't work. I'm not a programmer so have no idea what I am doing....
Help would be greatly appreciated!

Cath
ps here is the code so far - It doesn't get past the third line, let alone the rest of it....
Private Sub MergeButton_Click()
On Error GoTo MergeButton_Err
Dim objWord As Word.Application
'Start Microsoft Word 97.
Set objWord = CreateObject("Word.Application")
With objWord
'Make the application visible.
.Visible = True
'Open the document.
.Documents.Open ("U:\FLR\SHARED-FLR3-A\Pdg\Pdg Data\wdfiles\80000\80232\Technical Assistant\Tender Queries\DMSMerge.doc")
'Move to each bookmark and insert text from the form.
.ActiveDocument.Bookmarks("Date").Select
.Selection.Text = (CStr(Froms![Consultant Query]![Actual Date]))
End With
'Print the document in the foreground so MS Word 97 wont close until the doc
'finishes printing.
objWord.ActiveDocument.PrintOut Background:=False
'Close the document without saving changes.
objWord.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
'Quit MS Word 97 and release the object variable.
objWord = Nothing
Exit Sub
MergeButton_Err:
'If a field on the form is empty
'remove the bookmark text and continue.
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
Else
MsbBox Err.Number & vbCr & Err.Description
End If
Exit Sub
End Sub