Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Situation:
Office Apps: Excel XP and Word XP My .NET Windows.Forms app creates an Excel file using OLE Automation and populates that file with data from a database. I then use MailMerge.OpenDataSource() to open the Excel file with the following connection string and Sql command: string connStg = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";Us er ID=Admin;Data Source=insert file user-selected Excel data file with full path here;Mode=Read;Extended Properties=\"HDR=YES;IMEX=1;\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB ![]() string sqlStg = "SELECT * FROM `Sheet1$`"; These are based to OpenDataSource() as ref'd objects. Problem: There are actually two mailmerge operations I'm testing. The first succeeds, the second fails with the infamous "255 character limit" exception. The length of connStg + sqlStg is 277 characters for the first, successful merge and 290 characters for the second, failing merge. I'm not sure if those character lengths are what Word is "seeing" on its end, as .NET uses Unicode and I'm not sure what Word uses internally. Any suggestions on how to resolve this situation? - Mark p.s. BTW, may I assume that whatever, ahem, person left a 255 character limit in the Word mailmerge subsystem at least through Office XP has been summarily fired? |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save file as .doc having all data in ascii character set | Microsoft Word Help | |||
Can't Open Data Source (Query) where criteria is defined by functi | Mailmerge | |||
Character limit in mail merge | Mailmerge | |||
255 character limit in Word mail merge | Mailmerge | |||
character spacing changed when document prints | Microsoft Word Help |