mailmerge

Mailmerge using OpenOffice

做~自己de王妃 提交于 2019-12-03 08:45:44
I'm currently trying to do a mailmerge, using C# and OpenOffice. I have a list of destanatary in my DB. I would like this to be possible : the user edit an OO document, put fields like "name" "adresse" "city" and some standard text (e.g. : "Hello Name how are you ?", edit the style, etc etc, then go to my application, clic on "Send to all user in DB". Then the program loops through all user, and for each user replace the mailmerge fields in the OO document with DB data's, send it by mail/print/whatever. Problem : I can't find any way, in C#, to replace the mailmerge fields in the OO document

Mail Merge multiple ID

别说谁变了你拦得住时间么 提交于 2019-12-02 22:11:57
问题 I have data in excel, like below: and, i have microsoft Word document, like below: How to mail merge in microsoft word, one to Many row? I want result like below in microsoft Word: Thank You Very Much 回答1: This can be done, but it's a bit complex. There are a number of possible approaches, outlined at my website. Since you show the desired result as a table, using a Database field is probably the optimal way to go about it. Insert Database is an old command that's no longer exposed in the

How to set the file name of a word document without saving it from c# and automation

陌路散爱 提交于 2019-12-01 18:45:22
I create word documents via automation and mailmerge with office Interop from c# (.net4). The merge works well and the user receives the created document as he desires. So far all is well. The client now requests, that if he tries to save the generated file (via save file dialog), that the filename of the document is already prefilled. I already have tried the obvious things such as setting the Name property of the Document-instance and other properties, I also googled for a solution but up to now, I was not able to set the file-name of the word file (without saving it). Does someone knows a

How dangerous is it to let users specify RazorEngine templates?

百般思念 提交于 2019-12-01 04:46:15
I have mail-merge like functionality, which takes a template, some business object, and produces html which is then made into PDF. I'm using RazorEngine to do the template+model to html bit. If I let the users specify the templates, what risks am I taking? Is it possible to mitigate any risks? For example, could the users execute arbitrary code? (delete files, alter database, etc.?) Is there some way I can detect this sort of thing? (I know that would be impossible generally, but the bits of code in the razor template should be model property gets, or possibly if statements based on model

excel VBA to Automatically select Yes when prompted during mail merge

扶醉桌前 提交于 2019-11-30 23:26:15
I'd like the system to be as automated for my users as possible. Right now, I have code that runs when the user clicks a button. The code takes data with the intention of applying it to a word document via mail merge. Everything works as intended except there's always a message that pops up saying Opening this document will run the following SQL command: Select * FROM 'TAGS$' Data from your database will be placed in the document. Do you want to continue? I need to keep this as simple as possible without risking users selecting "No" because they're confused. How can VBA automatically proceed

Sending text to Mail-Merge Fields in Microsoft Word 2010

℡╲_俬逩灬. 提交于 2019-11-30 17:04:38
I'm using the following code to send a text to a simple word template I've set up just with a single MergeField at present to test I can get this working. The code I am using is as follows: public static void ReplaceMailMergeField(string pWordDoc, string pMergeField, string pValue) { object docName = pWordDoc; object missing = Missing.Value; Word.MailMerge mailMerge; Word._Document doc; Word.Application app = new Word.Application(); app.Visible = false; doc = app.Documents.Open(ref docName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,

How to do mail merge on top of a PDF?

与世无争的帅哥 提交于 2019-11-30 12:33:26
问题 I often get a PDF from our designer (built in Adobe InDesign) which is supposed to be sent out to thousands of people. I've got the list with all the people, and it's easy doing a mail merge in OpenOffice.org. However, OpenOffice.org doesn't support the advanced PDF. I just want to output some text onto each page and print it out. Here's how I do it now: print out 6.000 copies of the PDF, then put all of them into the printer again and just print out name, address and other information on top

How to do mail merge on top of a PDF?

两盒软妹~` 提交于 2019-11-30 02:09:05
I often get a PDF from our designer (built in Adobe InDesign) which is supposed to be sent out to thousands of people. I've got the list with all the people, and it's easy doing a mail merge in OpenOffice.org. However, OpenOffice.org doesn't support the advanced PDF. I just want to output some text onto each page and print it out. Here's how I do it now: print out 6.000 copies of the PDF, then put all of them into the printer again and just print out name, address and other information on top of it. But that's expensive. Sadly, I can't make the PDF to an image and use that in OpenOffice.org

MS Word, Import Table with Query Condition Based on Merge Field

感情迁移 提交于 2019-11-29 16:57:08
I'm creating a compliance mailing for my organization, the mailing will include merge fields that identify the office location, physician, and SiteId. The mailing will also include a table of information that is dependent upon the particular SiteId. I'd like to use the import table function of MS word and set up a query that references a merged field (SiteId) so that the inserted tables populate the appropriate data for the particular site. I'm unable to do this. How can I set up this document so that I can import only records from my source (an ms access query) that match the SiteId merge

How do I insert a mergefield into an If..else statement in VBA using Word MailMerge?

亡梦爱人 提交于 2019-11-29 16:26:29
The below macro will input the field heading followed by the field value. The If statement should check the value of the field and if its greater than 30 the actual value is given, otherwise a zero. Instead of the value appearing if it's true, I just get the actual text I've typed, not it's value. Sub Macro1() Dim doc As Word.Document Dim dtField As Word.MailMergeDataField Dim sFieldName As String Dim sFieldActualName As String Dim j As Integer Set doc = ActiveDocument j = 1 For Each dtField In doc.MailMerge.DataSource.DataFields sFieldActualName = doc.MailMerge.DataSource.FieldNames(j).Name