Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All Topics
Below is a sniper of code from an application I'm writing in C#. I have added the Microsoft Office Word 11.0 Object Library and the TEMPLATE_FILENAME constant has a valid filename. However the code hangs on the statement
//Open Microsoft Word
Microsoft.Office.Interop.W
wordapp.Visible = false;
object filename = TEMPLATE_FILENAME;
object objTrue = true;
object objFalse = false;
object objMiss = Type.Missing;
Microsoft.Office.Interop.W
myMergeDocument = wordapp.Documents.Open(ref
myMergeDocument.Select();
//Microsoft.Office.Interop
// ON THE LINE BELOW: "COMException was unhandled." and "requested object is not available"
myMergeDocument.MailMerge.
myMergeDocument.MailMerge.
myMergeDocument.MailMerge.
myMergeDocument.MailMerge.
myMergeDocument.MailMerge.
//myMergeDocument.Close();
wordapp.Visible = true;
wordapp.ShowMe();
return;
--------------
I have a word document that is set up with a mail merge source already and I just want to make it open and perform the merge. The merge source is a text file. The Open command doesn't seem to work correctly because the mail merge toolbar is disabled. Someone please help!!!
(I know how to use try catch blocks - i'm interested in fixing the problem...not just handling it gracely)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: PhilluminatiPosted on 2006-03-10 at 02:11:25ID: 16153175
Comments are available to members only. Sign up or Log in to view these comments.