Home |
Search |
Today's Posts |
#1
|
|||
|
|||
MailMerge.CreateHeaderSource
I am having problems getting this functionality to work!
I have Word 2003, and am trying to give the users a list of fields to select while creating their letter templates. Using the following statement gives me a message box that the headerstring is 255 characters, which it is. Dim headerString as String Dim fileName as String headerString = "LastName, FirstName, Address1, Address2, City, State, Zip, Country, ........" '(Len(headerString) 255 chars) fileName = "HeaderFields.doc" objWord.MailMerge.CreateHeaderSource fileName, , , headerString I think this limitation is due to the fact that it stores the fields in a single row table in the Word Document specified by fileName. Cannot have unlimited number of cells on one row. I tried getting around this by manually creating an excel spreadsheet with the fields in different cells, and calling objWord.MailMerge.OpenHeaderSource fileName.xls This time it failed on an RPC call. Has anybody faced this problem before? |