View Single Post
 
Old 08-26-2015, 08:48 AM
catflap's Avatar
catflap catflap is offline Windows XP Office XP
Advanced Beginner
 
Join Date: Aug 2015
Location: UK
Posts: 77
catflap is on a distinguished road
Default

Thanks for responding.

I've tried the fit text thing before - it sounded like what I wanted initially, but unfortunately the result is that word just stretches the text, which can produce some ugly results. What I'm really after is something that will adjust the font size to fit instead, so it doesn't look distorted.

To address your other point, I had envisioned running a mail merge by looping through the document's datasource in vba and printing the current record as I went - not ideal I know, but it would have to be something like that to get the excel cell updated with each record as it looped.

I've been toying with this sort of thing:

Dim objExcel As New Excel.Application
Dim exWb As Excel.Workbook

Set exWb = objExcel.Workbooks.Open("c:\mergesource.xls")
exWb.Sheets("Sheet1").Cells(1, 1) = "Hello there"
MsgBox exWb.Sheets("Sheet1").Cells(1, 1)


This displays the corrected 'Hello there' text in the msgbox, but does not update the excel object in, so it doesn't help unless I can find some way to update or refresh it (the aim being to be able to make use of Excel's ability to re-size the text and then merge to this). I guess this is what you meant when referring to the 'deactivation method'?

I'm starting to get the feeling I'm trying to get Word to do something it just doesn't want to do, and that never seems to lead to a positive result....
Reply With Quote