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:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>