Hi
I have a strange problem in Word when doing a MailMerge on one of our pc's (the process works fine on all others...).
I have these two merges which need to be run fairly regularly:
which as you can see are basically the same but merge with different data sources.
Problem is, if the user runs one of them and then the other, the second one appears to ignore the merge command and so we end up with just the template. The only way around this is to reboot the system.
If we then try the merge from any other pc, it will work fine!
The system is WindowsXP SP2, Office 2002 (with most recent updates) and is the same as most of our other workstations.
Please help, this is driving me mad!!
I have a strange problem in Word when doing a MailMerge on one of our pc's (the process works fine on all others...).
I have these two merges which need to be run fairly regularly:
Code:
Public Sub AccxIR35()
Dim ans
WordBasic.Shell "s:\bc\BAX.bat"
ans = WordBasic.MsgBox("Merge Contracts?", 3)
If ans = 0 Or ans = 1 Then GoTo Bye
Documents.Open FileName:="S:\WP\CONTRACT\ir35accx.rtf", ConfirmConversions:=False, ReadOnly _
:=True, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With
Windows("ir35accx (Read-Only)").Activate
ActiveDocument.Close wdDoNotSaveChanges
Bye:
End Sub
Code:
Public Sub ClientContract()
Dim ans
WordBasic.Shell "s:\bc\C-Clet.bat"
ans = WordBasic.MsgBox("Merge Client Contracts?", 3)
If ans = 0 Or ans = 1 Then GoTo Bye
Documents.Open FileName:="S:\WP\CONTRACT\CLIENT.DOC", ConfirmConversions:=False, ReadOnly _
:=True, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With
Windows("CLIENT.DOC (Read-Only)").Activate
ActiveDocument.Close wdDoNotSaveChanges
Bye:
End Sub
which as you can see are basically the same but merge with different data sources.
Problem is, if the user runs one of them and then the other, the second one appears to ignore the merge command and so we end up with just the template. The only way around this is to reboot the system.
If we then try the merge from any other pc, it will work fine!
The system is WindowsXP SP2, Office 2002 (with most recent updates) and is the same as most of our other workstations.
Please help, this is driving me mad!!