Click here to Skip to main content
15,903,767 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi
My need is that i have a template in my sql database . I have to get the details like name,address from db & add it to the template & perform the action of mail merge .

Am uSing VS 2008,C#, Office 2007 & SQL 2005
Posted
Updated 19-Oct-11 4:35am
v3
Comments
jim lahey 18-Oct-11 4:25am    
And what kind of error?
Vinodh.B 18-Oct-11 6:33am    
Requested Object is not available
ChandraRam 18-Oct-11 8:09am    
It looks like "wrdMailMerge" is not available. Have you checked that the object is valid? Post the code used to create this object.
Vinodh.B 18-Oct-11 10:02am    
Please find the above link for entire code .
ChandraRam 18-Oct-11 10:07am    
Are you using the code as is or have you made any modifications? Like I said earlier, did you debug and check whether the object is valid?

If found below in this Mailmerge issue[^]

You will see this message if there is no MailMerge object in the document, and that will happen if Word did not open the data source.

At the moment I would say there are two strong possibilities why thiat would
happen on some machines and not others:
a. http://support.microsoft.com/kb/825765/en-us[^] has been applied on some
machines and not others
b. Word updates are more up-to-date on some machines than others (a fairly
recent security update has altered Word's behaviour when it is opening
MailMerge documents).
 
Share this answer
 
im dinesh kumar
i done mail merge concept

first from your sql database table to dataset pass your value
In your table values should not be
null
and then save in word document in table view
use your active document to word document
in your active document use ( "«"names "»" )like this in your missing word document


if you have doubt mail me
 
Share this answer
 
v2
Comments
SoMad 11-Jul-12 22:36pm    
Answers are appreciated, but you should really modify this answer, deleting your email address. We don't mind that you put it there, but you are likely to get hit by spam mail if you leave it like this.

Soren Madsen
ErBhati 1-Jul-16 6:44am    
Hi dinesh,
i am currently stuck in this stuff. can you please send me the code of mail merge on my mail Id (kapilbhati2310@yahoo.com or erkapilbhati@gmail.com).
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900