|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 09/30/2008 at 08:11PM PDT, ID: 23776842 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: |
Public Sub PrintMMDoc_MS_Word(ByVal strMMDataDir As String, ByVal strMMDataFile As String, ByVal strMMDocDir As String, ByVal strMMDDocFile As String)
'2007-06-03 Ted Palmer
'Dim wrdApp As Word.Application: Instantiated in class frmLogin >> cmdLogin_Click event.
'Closed & Disposed in class MainMDIFrame >> Closing event
go_wrdApp.Visible = True
'2007-05-24 Ted Palmer
'This Try-Catch block uses MailMerge functionality of "Word.Application" to print an instance
'of the MS-word document passed as a parameter to this subroutine and
'the MailMerge data file passed as a parameter to this subroutine.
Try
'Open an existing MailMerge Main document.
Dim wrdDoc As Object
go_wrdApp.ChangeFileOpenDirectory(strMMDocDir)
wrdDoc = go_wrdApp.Documents.Open(FileName:=strMMDDocFile) '<-- MS-Word MailMergeMain document
wrdDoc.MailMerge.MainDocumentType = 0
wrdDoc.MailMerge.OpenDataSource(Name:= _
strMMDataDir & strMMDataFile, ConfirmConversions:=False, _
ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=0, _
Connection:="", SQLStatement:="", SQLStatement1:="", SubType:=0)
With wrdDoc.MailMerge
.Destination = 0
.SuppressBlankLines = True
With .DataSource
.FirstRecord = 1
.LastRecord = -16
End With
.Execute(Pause:=False)
End With
Catch ex As Exception
MessageBox.Show("In Module MainModule >> Sub PrintMMDoc, there was an Error in the MailMerge process. " _
& "YOU the user probably caused this exception by closing the Microsoft Word application frame. " _
& "Please don't do this again. You probably did this during the Print Preview process. During that process. " _
& "you must close the MS-Word document and the MS-Word MailMerge Main document, but not the application frame. " _
& "When closing the MailMerge Main document, you will see 2 small x(s) in the upper right corner of the application " _
& "frame. Click ONLY the bottom x. Then minimize the application frame. To recover from this condition " _
& "and restore the printing subsystem, you must exit the AutoSubrogate(TM) program and restart it again. " _
& "Please save your work and restart the AutoSubrogate(TM) program now: " & ex.Message, _
"AutoSubrogate(TM) Exception:", MessageBoxButtons.OK, MessageBoxIcon.Stop)
End Try
End Sub 'PrintMMDoc_MS_Word
|
Advertisement