Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I am attempting to convert a plain text document that contains certain
variables as delimited by the "@" or other user specified delimiters and I can't seem to get the merge fields to position themselves in the proper location. What currently happens is that the variables are successfully removed, but the merge fields are all placed at the end of the document. Also, any merge fields that have more than one word in the field name is truncated to only the first word of the field's name. The code that I am using is below: With objWord.Content.find rsVariableDefinitions.MoveFirst Do Until rsVariableDefinitions.EOF 'loop through variable definition table and replace text with their merge fields .Execute strDelimiter & rsVariableDefinitions!Variable & strDelimiter, , True, , , , True, , , "", True 'Delete the variable placeholder If .Found Then Let strField = rsVariableDefinitions("Field") objWord.MailMerge.Fields.Add oSel.Range, strField End If rsVariableDefinitions.MoveNext Loop End With Can any one please help! Thanks, Drew |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting WordPerfect 12 files to Word 2003 | New Users | |||
Why dont MS just f**king re-write Word from scratch? Its dogsh*t | Microsoft Word Help | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
WP merge file to Word | Tables | |||
merge instructions from text file | Mailmerge |