A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

doc



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2004, 10:07 AM
Ziver MALHASOGLU
external usenet poster
 
Posts: n/a
Default doc

just give me a simple mailMErge example please, preferably with full source
code...

Regards,


http://support.microsoft.com/default...b;EN-US;301659

i have tried the example above, but i got the error:
"invalid merge field" for the fields: FirstName, LastName,
Address,CityStateZip and got the additional errors:

A field calculation error occurred in record 1.

A field calculation error occurred in record 2.

A field calculation error occurred in record 3.



Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.





in the example, the data source is not given:





Object oName = "C:\\DataDoc.doc";



  #2  
Old April 28th, 2004, 04:17 AM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default doc

I would suggest that first you attempt to execute the merge manually from
Word so that you can determine whether it is a Word problem or a Visual C#
..NET problem.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Ziver MALHASOGLU" wrote in message
...
just give me a simple mailMErge example please, preferably with full

source
code...

Regards,


http://support.microsoft.com/default...b;EN-US;301659

i have tried the example above, but i got the error:
"invalid merge field" for the fields: FirstName, LastName,
Address,CityStateZip and got the additional errors:

A field calculation error occurred in record 1.

A field calculation error occurred in record 2.

A field calculation error occurred in record 3.



Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.





in the example, the data source is not given:





Object oName = "C:\\DataDoc.doc";




  #3  
Old April 28th, 2004, 09:18 AM
Ziver MALHASOGLU
external usenet poster
 
Posts: n/a
Default doc


thank you for your answer Doug,

As you said i have tried the "mail merge" facility of Word manually
first.

Now i need a code that uses a template, that have generated, a
datasource and as a result it produces the merged file.

I have found a lot of examples on web, but they don't use an existing
template, they produce their own templates dynamically in code.

I had found some recommendations also about using templates, but they
don't present full sample code.

If you can give some code it will be very beneficial for me.

regards,


"Doug Robbins - Word MVP" wrote in message
...
I would suggest that first you attempt to execute the merge manually from
Word so that you can determine whether it is a Word problem or a Visual C#
.NET problem.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Ziver MALHASOGLU" wrote in message
...
just give me a simple mailMErge example please, preferably with full

source
code...

Regards,


http://support.microsoft.com/default...b;EN-US;301659

i have tried the example above, but i got the error:
"invalid merge field" for the fields: FirstName, LastName,
Address,CityStateZip and got the additional errors:

A field calculation error occurred in record 1.

A field calculation error occurred in record 2.

A field calculation error occurred in record 3.



Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.





in the example, the data source is not given:





Object oName = "C:\\DataDoc.doc";






  #4  
Old April 29th, 2004, 02:16 PM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default doc

check out:

http://www.attcanada.net/~kallal.msn.../msaccess.html



--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Ziver MALHASOGLU" wrote in message
...

thank you for your answer Doug,

As you said i have tried the "mail merge" facility of Word manually
first.

Now i need a code that uses a template, that have generated, a
datasource and as a result it produces the merged file.

I have found a lot of examples on web, but they don't use an existing
template, they produce their own templates dynamically in code.

I had found some recommendations also about using templates, but they
don't present full sample code.

If you can give some code it will be very beneficial for me.

regards,


"Doug Robbins - Word MVP" wrote in message
...
I would suggest that first you attempt to execute the merge manually

from
Word so that you can determine whether it is a Word problem or a Visual

C#
.NET problem.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions

forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Ziver MALHASOGLU" wrote in message
...
just give me a simple mailMErge example please, preferably with full

source
code...

Regards,


http://support.microsoft.com/default...b;EN-US;301659

i have tried the example above, but i got the error:
"invalid merge field" for the fields: FirstName, LastName,
Address,CityStateZip and got the additional errors:

A field calculation error occurred in record 1.

A field calculation error occurred in record 2.

A field calculation error occurred in record 3.



Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.

Error! MergeField was not found in header record of data source.





in the example, the data source is not given:





Object oName = "C:\\DataDoc.doc";







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.