donohoe1
asked on
Issues with Word merge using VB.
We use a construction project management system called Prolog with a SQL back end. When a contract is generated Prolog opens the appropriate document in Word 2013 and uses VB to merge data from SQL into the document.
We have Prolog and Office 2013 installed on a dedicated XenApp 6.5 server running on Windows 2008 R2.
The problem is, for some users you can see the merge taking place, but once the merge is done the document loses all the merged data and you're left with the original, un-merged document. We have already tired different versions of Office, making the user a domain admin, deleting the user's Citrix profile and letting it re-create, and logging on to the Citrix server locally, but nothing has worked thus far.
Any ideas or possible avenues to explore?
We have Prolog and Office 2013 installed on a dedicated XenApp 6.5 server running on Windows 2008 R2.
The problem is, for some users you can see the merge taking place, but once the merge is done the document loses all the merged data and you're left with the original, un-merged document. We have already tired different versions of Office, making the user a domain admin, deleting the user's Citrix profile and letting it re-create, and logging on to the Citrix server locally, but nothing has worked thus far.
Any ideas or possible avenues to explore?
Does the VB use Word's Mail Merge facility, or is it a completely separate merge using different techniques?
ASKER
How would I be able to tell?
Below is an abridged log file of the merge:
Enter MS Word Merge Initial Process
Lock Table success in inital merging process
Update Table success in inital Merging
Begin insert_merge processing...
Move recordset to first record
Start to activate WordOLE
Assign OLE object variable
ChkDocEmpty
Save grammer checking
Save spell checking
Turn off grammer checking
Turn off spell checking
GetMergeSet
Get login name from security manager
Get FormField count
Get objCurrentFld
Get objCurrentFld.Result
Get objCurrentFld.StatusText {Contracts.FromSignedBy}
Start process field {Contracts.FromSignedBy}
Start assign result to field
Finish assign result to field
Get objCurrentFld Bob Smith
Get objCurrentFld.Result Bob Smith
Get objCurrentFld.StatusText {Projects.Name}
Start process field {Projects.Name}
Start assign result to field
Finish assign result to field
Get objCurrentFld Window Treatments
Get objCurrentFld.Result Window Treatments
Get objCurrentFld.StatusText {ContractSchedOfValues.Ite mNumber}
Start process field {ContractSchedOfValues.Ite mNumber}
Get objCurrentFld ItemNumber
Get objCurrentFld.Result ItemNumber
Get objCurrentFld.StatusText
Start process field
Get objCurrentFld
Get objCurrentFld.Result
Get objCurrentFld.StatusText {ContractAlternates.Descri ption}
Start process field {ContractAlternates.Descri ption}
VB Error #4608:
Value out of range
MergeLinkRec Error occurs: %1
No Error.
No Error.
Error in InsertMerge :Invalid procedure call or argument
Error in InsertMerge :%1
No Error.
VB Error #4608:
Value out of range
MergeLinkRec Error occurs: %1
No Error.
No Error.
Error in InsertMerge :Invalid procedure call or argument
Error in InsertMerge :%1
No Error.
No Error.
Merging exit is in progress...
Finish whole merge process
Below is an abridged log file of the merge:
Enter MS Word Merge Initial Process
Lock Table success in inital merging process
Update Table success in inital Merging
Begin insert_merge processing...
Move recordset to first record
Start to activate WordOLE
Assign OLE object variable
ChkDocEmpty
Save grammer checking
Save spell checking
Turn off grammer checking
Turn off spell checking
GetMergeSet
Get login name from security manager
Get FormField count
Get objCurrentFld
Get objCurrentFld.Result
Get objCurrentFld.StatusText {Contracts.FromSignedBy}
Start process field {Contracts.FromSignedBy}
Start assign result to field
Finish assign result to field
Get objCurrentFld Bob Smith
Get objCurrentFld.Result Bob Smith
Get objCurrentFld.StatusText {Projects.Name}
Start process field {Projects.Name}
Start assign result to field
Finish assign result to field
Get objCurrentFld Window Treatments
Get objCurrentFld.Result Window Treatments
Get objCurrentFld.StatusText {ContractSchedOfValues.Ite
Start process field {ContractSchedOfValues.Ite
Get objCurrentFld ItemNumber
Get objCurrentFld.Result ItemNumber
Get objCurrentFld.StatusText
Start process field
Get objCurrentFld
Get objCurrentFld.Result
Get objCurrentFld.StatusText {ContractAlternates.Descri
Start process field {ContractAlternates.Descri
VB Error #4608:
Value out of range
MergeLinkRec Error occurs: %1
No Error.
No Error.
Error in InsertMerge :Invalid procedure call or argument
Error in InsertMerge :%1
No Error.
VB Error #4608:
Value out of range
MergeLinkRec Error occurs: %1
No Error.
No Error.
Error in InsertMerge :Invalid procedure call or argument
Error in InsertMerge :%1
No Error.
No Error.
Merging exit is in progress...
Finish whole merge process
ASKER
Two separate users can run the exact same contract using the exact same data, and it'll work for one and not the other.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
After digging through the log files, we found for certain users the merge was erroring out when merging an empty field in the DB into the Word document. Once we removed those fields it's started working fine. We still don't know why it would never work from some user and work for others.
good comments and recommendations provided