Rich text form inconsistencies (OpenInsight Specific)
At 18 MAY 1999 10:58:40AM B. Cameron wrote:
I have a form that has a menu option that when selected will
launch a form that reads an rtf file and displays.
All works well except that 2 out of 3 rtf files that all look
similar (in font) when opened in Word display very very small
when opened and displayed in OpenInsight.
I was informed that there are different types but am wondering
how I can fix this in OI. We have about 4000 rtf files and we
need them all to be consistant.
Does anyone know why this is happening? How it could be resolved
in OI or how a routine could be written/done to automatically read 1 by 1 in Word and filed so that the compatible format is recognized?
Thanks
At 19 MAY 1999 04:23AM Oystein Reigem wrote:
Bruce,
You know already that the OI RTF edit box only understands a subset of RTF. Perhaps the problematic files contain coding that the RTF edit box doesn't recognize, or coding that is misinterpreted.
You might remember I discovered a case where the OI RTF edit box seems to need a line break in the RTF text to understand font codes correctly. Maybe you've come across something similar. If you can spot one particular cause like that you might be able to fix the problem by running a simple conversion of the text brfore you put it in the edit box.
How are your RTF files prepared? Have you any control over what kind of formatting they contain? The best thing would of course be if they are prepared automatically with a program (your program), but I assume they are prepared manually with Word. If I were the one preparing the files I would use formatting very conservatively. E.g I would not format headings with Styles (that list box normally found to the very left in the Word tool bar(s), grouped with Font and Font Size), but set their font attributes explicitly with Font, Font Size and Bold/Italics/etc. Mind - I haven't tried styles myself, but at least that's a case where you can use different ways of formatting (and presumably get rather different RTF coding) to get similar looks.
- Oystein -
At 19 MAY 1999 10:50AM b. cameron wrote:
Oystein,
Thanks alot… again. Yes, I do remember our conversation and actually the problem is the fonts. What I need is a solution.
All of the rtf's have already been done before and outside
of the oi app. As of yesterday I have been collaborating with Jonathan Eaton. He believes he can write a routine to mass update all of the files to the correct font.
Thanks alot for your input.
Bruce
At 20 MAY 1999 04:17AM Oystein Reigem wrote:
Bruce,
…Thanks alot…
Alas, that's the only pleasure I get from the RTF edit box - trying to help others with their problems. I cannot use the damn thing!
![]()
![]()
- Oystein -
At 20 MAY 1999 04:21PM B. Cameron wrote:
Oystein,
How come? You mean at all or just for a specific app?
Here's the response Jon sent me when I sent him a test file..
]]
I took a look at your RTF files. It looks like those files that aren't working right are missing the font size code which normally follows the font specifier. The one file that works has the font size codes. My guess is that when the font size code is missing, Word picks a more reasonable font size than OI does. Perhaps OI simply picks the smallest font size available for that font.
]]
Well hope it gets better for you!! ;)
Bruce
At 21 MAY 1999 04:17AM Oystein Reigem wrote:
Bruce,
I cannot use the OI RTF edit box because it only accepts 7-bit characters. I need my Norwegian characters æøåÆØÅ. And of course it would be nice with §¼¾?©""¹²³ too, not to mention the currency symbols ¢£¥ and the new Euro symbol!
Btw - here's a list of features I've found work in RTF edit boxes: Fonts, font sizes, styles (italics, bold, normal), colour, underline. The following do not work: Caps, strikethrough, dotted and double underline, background and highlight colours, bullets, indent, margins, spacing, tables. You can use tabs, but no fancy stuff, and you cannot not define the tab positions in RTF. And I assume lists don't work.
- Oystein -
At 21 MAY 1999 11:14AM B. Cameron wrote:
Oystein,
Thanks for the info.
Just a thought… could you, through OI coding, call the MS Word
previewer from a form in OI with a button?
Just curious. I would not know how to get this to work but it might
be the route I need to go down.
Take care.
At 21 MAY 1999 11:58AM Oystein Reigem wrote:
Bruce,
Word Previewer? Do you mean Forhåndsvisning?
I assume you want to do a print preview in Word.
You should be able to start Word from your app, e.g with a Utility RUNWIN something/something/winword.exe. Then you could tell Word by DDE to open the rtf file. Or you could do both things in one operation with a Utility RUNWIN directly on the rtf file in question. That's probably the easiest.
(Btw - if you're thinking of using this as an alternative to the RTF edit box you don't need RTF files. You can use Word files.)
Then your app could issue a DDE command to do a print preview. Except you must do it via a Word macro.
So beforehand you must have recorded a macro that does a print preview. It will look something like
Sub Makro2()
'
' Makro2 Makro
' Makro registrert 21.5.99 av OYSTEIN
'
ActiveDocument.PrintPreviewEnd Sub
except you'll use a more sensible name than Makro2.
To run the macro I think you must do something like
Void=Set_Property( @Window, "DDESERVICE", "WINWORD" )
Void=Set_Property( @Window, "DDECOMMAND", 'Makro2()' )
and perhaps you should check for errors inbetween with
DDEError=Get_Property( @Window : ".DDE", "DDEERROR" )
if DDEError …
If you want to open the file with DDE too, it's something like
Void=Set_Property( @Window, "DDECOMMAND", 'FileOpen .Name=c:\xxxx\yyyyyy\aaaa.doc"' )
- Oystein -
At 21 MAY 1999 02:00PM [email protected] onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Group[/url] wrote:
Of course you could eliminate the need for DDE entirely using the following switches with RUNWIN and Winword.exe
Open an existing document
Run a macro and prevent the AutoExec macro /m
from running
World Leaders in all things RevSoft
At 24 MAY 1999 01:35PM B. Cameron wrote:
Sounds good but I am not sure if I completely follow both you and
Andrew's instructions.
1) I would need to create a macro… Something I haven't done in Word.
2) Using runwin; if I get the name of the doc/rtf in Oi I could
then lauch Word - ?Preview Only-No edit? from my form?
3) I am not sure I follow Andrew's instructions on the switches, could someone be more specific or IS that specific.
Thanks.
At 25 MAY 1999 12:23PM Oystein Reigem wrote:
Bruce,
1) I would need to create a macro… Something I haven't done in Word.
Almost me neither. But this macro will be very simple - just one command. No branching and no loops. Word has a macro recording facility. Use that. I haven't got Word with me where I am now (at a desk at Sprezzatura actually (but Andrew is on holiday (and Carl is very busy so I can't ask him too much either))), but I'm sure you'll be able to find it. The macro recorder will show as a small cassette recorder with a start and stop button. Start the recorder, choose the File ¦ Print Preview command and stop the recorder again. You'll be asked for a name of the macro and where to store it. I think you can choose between storing it with the current document or in normal.dot (or perhaps with another dot if you're using a different style sheet (or whatever they're called)). The easiest is probably normal.dot.
2) Using runwin; if I get the name of the doc/rtf in Oi I could then lauch Word - ?Preview Only-No edit? from my form?
So it is not a Print Preview? You just want to show the document? Of course. Then you might not need any macro.
I don't know how to make it read-only, though. Well of course you can set the document files to read-only, e.g with the DOS attrib command (e.g attrib +R myfile.doc).
But if you can get Word to open files in a read-only mode? There might be a command switch for all I know.
3) I am not sure I follow Andrew's instructions on the switches, could someone be more specific or IS that specific.
Ndrw s lws vr brf.
I think he meant that when you start Word (you do it indirectly by starting a doc/rtf file) you can add an /m command line switch, something like
Utility( "RUNWIN", "c:\my\file1.doc /m mymacro" )
to get the macro mymacro executed automatically at startup. Mind you - I haven't checked this syntax.
Btw - if you have to experiment a little before find the best way to start Word, you can do it from the Task Bar Start button (Start ¦ Run). That will be the same as Utility( "RUNWIN", … ).
- Oystein -