Thanks very much Stephane and Richard,
   
  I first tried the .visible and that actually worked with my found code. A 
little ha ha here is that when I finally got the window to show all 17 of my 
earlier attempts showed up as well. 
   
  I used the reduced version from Richard and this worked as well as mine only 
after I remmed out the same offending code:
   
      styletext.text = style.namelocal
    stylefontname.text = style.font.name
    stylefontsize.text = style.font.size
   
  for some reason the compiler doesn't recognize the reserveds. Odd, but you 
know what I can live with the font force that you provided at the top of the 
code.
   
  What I am doing...I am building a small app for my wife (prof.) that does 
some text manipulation on tests she wants to administor to save her time. I 
wanted some of the results to have the .doc option for her to do more advanced 
formating and save off as someing more than rtf.
   
  Thanks greatly; this will get me the immediate results I need and perhaps 
when I have time I'll go back and see what is the problem with the 
style****.text portion.
   
  THis board is great BTW. You've saved my bacon many times as the LR is shaky 
at best for my application so far.
   
  cheers
  Derek

Steve Garman <[EMAIL PROTECTED]> wrote:
  In a message regarding Creating Word Doc from text in EditField dated Fri,
2 Jun 2006 11:00:15 -0700 (PDT), D Prowse said that ...

> Hi
> I've been trying to get rb2006r2 to launch a Word Doc using the text a user 
> enters in a texbox (editfield).

I'm not sure what you are trying to do but this works for me in Win XP with
Word 2003, except it produces a silly value for font size

Const wdStyleTypeCharacter = 2
Const wdStyleTypeList = 4
Const wdStyleTypeParagraph = 1
Const wdStyleTypeTable = 3

Dim word as WordApplication
Dim doc as WordDocument
Dim style as WordStyle


word = New WordApplication
word.Visible = true
doc = word.documents.add
doc.range.text = Editfield1.text

style = doc.paragraphs.item(1).style
if Style.Type = wdStyleTypeParagraph Then

styletext.text = style.namelocal
stylefontname.text = style.font.name
stylefontsize.text = style.font.size

end if
Exception err as OLEException
MsgBox err.message


--
Steve Garman
Using REALbasic 2006r2 Professional on Windows XP Pro


_______________________________________________
Unsubscribe or switch delivery mode:


Search the archives of this list here:



 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to