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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with mail merging using a Text File
Hi,
I am working on a web based application, which is supposed to do mail merge amongst other things. All the processing is done on the back end using Visual Basic dlls. This means that the mail merge process has to be fully automated as well. Here is an outline of the system: a word document which is set up as a mail merge document a text file containing the headers of the fields (since the actual data is generated on the fly upon a user's request) a text file which is generated when a user makes a request for a letter both of the text files use a tab as the field delimiter and the new line combination (13 and 10 i think) as the record delimiter my problem is that sometimes (for example when there is only one record in the text file) a little dialog box pops up asking me to specify the delimiters even though its already got the correct ones in... As you can understand this defeats the point of the application being automatic. i have gone through msdn library and tried several other sources but i cannot find anywhere that specifies how to manipulate that dialog box programmatically (either click yes/ok or suppress/ignore it) I have also tried some of the typical workarounds such as saving the text file using a different extension and I have also checked the registry entries under the text datasource of the Jet engine. I would IMMENSELY appreciate your help in this! Kind Regards, Steven C Moschidis MBCS |
#2
|
|||
|
|||
Help with mail merging using a Text File
Hi Steven,
my problem is that sometimes (for example when there is only one record in the text file) a little dialog box pops up asking me to specify the delimiters even though its already got the correct ones in... There's a somewhat obscure Knowledge Base article on this problem. What it basically comes down to is that Word wants to do its job really well, so it wants a "pattern confirmation" that the field delimiter it's guessing is actually the one to use. Since one record + header source isn't enough for that, the dialog box displays. What should work is to duplicate the field names in the header source file (just copy/paste). Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#3
|
|||
|
|||
Help with mail merging using a Text File
Hi Cindy,
Thank you for your reply! Cindy M -WordMVP- wrote: Hi Steven, my problem is that sometimes (for example when there is only one record in the text file) a little dialog box pops up asking me to specify the delimiters even though its already got the correct ones in... There's a somewhat obscure Knowledge Base article on this problem. What it could you please forward a link for this KB article? basically comes down to is that Word wants to do its job really well, so it wants a "pattern confirmation" that the field delimiter it's guessing is actually the one to use. Since one record + header source isn't enough for that, the dialog box displays. What should work is to duplicate the field names in the header source file (just copy/paste). I have tried this and I am afraid it doesnt work... (I tried with triplicate as well...) The single record result sets still require me to click on ok and some multiple record result sets pause until I verify the delimiters (I still have not been able to figure out the pattern for the multiple record result sets) As you can understand even if the suggested solution worked I would still be looking for a way to handle that specific dialog in case it showed up in the future when the system is out of testing... I would really appreciate any further thoughts you might have on this. What really puzzles me is the fact that there is no apparent way to programmatically manipulate the dialog (if im missing something please correct me!!!) Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) Thank you for your help and time! Kind Regards, Steven C Moschidis MBCS |
#4
|
|||
|
|||
Help with mail merging using a Text File
Hi Steven,
There's a somewhat obscure Knowledge Base article on this problem. What it could you please forward a link for this KB article? I don't have it at hand, but you should be able to turn it up by searching the Knowledge Base at microsoft.com or through Google. Try something like Wd97 AND "mail merge" AND delimiter What should work is to duplicate the field names in the header source file (just copy/paste). I have tried this and I am afraid it doesnt work... Then I'm afraid you're going to be in very big trouble... There's another Knowledge Base article, written for automating Office from VB, that describes how to (with luck) close messages that are waiting for user input. I'd try searching for that with something like VB AND Off2000 AND dismiss AND message Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#5
|
|||
|
|||
Help with mail merging using a Text File
Dear Cindy,
I am eternally grateful for your help. It turns out that the search you suggested (VB AND Off2000 AND dismiss AND message ) returned a KB article that deals specifically with this type of problem. (for the benefit of others having the same problem: the KB article suggests using a Timer event at the point where a dialog might appear and simulate user input using the SendKeys function) (http://msdn.microsoft.com/library/en...asp?frame=true) It looks like I will not have to redesign everything to make it work...! Thank you so much for your help! Kind Regards, Steven C Moschidis MBCS Cindy M -WordMVP- wrote: Hi Steven, There's a somewhat obscure Knowledge Base article on this problem. What it could you please forward a link for this KB article? I don't have it at hand, but you should be able to turn it up by searching the Knowledge Base at microsoft.com or through Google. Try something like Wd97 AND "mail merge" AND delimiter What should work is to duplicate the field names in the header source file (just copy/paste). I have tried this and I am afraid it doesnt work... Then I'm afraid you're going to be in very big trouble... There's another Knowledge Base article, written for automating Office from VB, that describes how to (with luck) close messages that are waiting for user input. I'd try searching for that with something like VB AND Off2000 AND dismiss AND message Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#6
|
|||
|
|||
Help with mail merging using a Text File
Hi Steven,
It turns out that the search you suggested (VB AND Off2000 AND dismiss AND message ) returned a KB article that deals specifically with this type of problem. Glad the old grey cells are still good for something :-), and that you're up and running! Cindy Meister |
Thread Tools | |
Display Modes | |
|
|