Click here to Skip to main content
15,899,475 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalreading RTF message Body, outlook automation Pin
pnpfriend13-Aug-03 5:00
pnpfriend13-Aug-03 5:00 
QuestionCreating A Bitmap? Pin
GrindAZ12-Aug-03 9:48
GrindAZ12-Aug-03 9:48 
GeneralBuilding a report viewer for Access Pin
sagmam10-Aug-03 22:07
sagmam10-Aug-03 22:07 
GeneralRe: Building a report viewer for Access Pin
mikasa27-Aug-03 2:57
mikasa27-Aug-03 2:57 
QuestionNetScheduleJobAdd API Alternatives? Pin
runtimeware8-Aug-03 13:34
runtimeware8-Aug-03 13:34 
AnswerRe: NetScheduleJobAdd API Alternatives? Pin
Garth J Lancaster8-Aug-03 14:03
professionalGarth J Lancaster8-Aug-03 14:03 
AnswerRe: NetScheduleJobAdd API Alternatives? Pin
Garth J Lancaster8-Aug-03 14:05
professionalGarth J Lancaster8-Aug-03 14:05 
GeneralMicrosoft Word 2000 from the Web Pin
William O'Malley8-Aug-03 4:49
sussWilliam O'Malley8-Aug-03 4:49 
Hi,
I need some help with a question.
First I am using VBScript for a client side spellchecker. The code below works but does not keep the rich text formatting that I need.
Sub RichTextSpellChecker(ItemToCheck)
Dim WordObject
Dim WordDocumentObject
Dim strReturnValue
Dim strValueToCheck
strValueToCheck = "" & document.getElementById(ItemToCheck).innerTEXT

IF NOT (strValueToCheck = "") THEN
'let the user know that the spelling is being checked.
window.status = "Spell Check is processing, please wait this may take a few seconds."

'Create a new instance of word Application
Set WordObject = CreateObject("word.Application")
'set window parameters
WordObject.WindowState = 2
WordObject.Visible = False

'Create a new instance of Document and add the text to the document
Set WordDocumentObject = WordObject.Documents.Add( , , 1, True)

WordDocumentObject.Content = strValueToCheck
WordDocumentObject.CheckSpelling

'Return spell check completed text data
strReturnValue = WordDocumentObject.Content
'give the corrected spelling to the textbox that was checked
'MsgBox(strReturnValue)
document.getElementById(ItemToCheck).innerTEXT = strReturnValue

' House Cleaning
'Close Word Document
WordDocumentObject.Close False
'Set Document To nothing
Set WordDocumentObject = Nothing

'Quit Word
WordObject.Application.Quit True
'Set word object To nothing
Set WordObject= Nothing
'let the user know that the spell check has completed. just incase it takes a few seconds to reload the page.
window.status = "Spell check is complete"
END IF
End Sub

As you can see I am using innerTEXT because if I try to use innerHTML the spellchecker will come back and tell me that
HI is spelled incorrectly. Is there a way to keep the text formatting while using the spellchecker?

Thanks
William O'Malley


__________________
GeneralShaped Forms | vb.NET Pin
Yamarain8-Aug-03 4:01
Yamarain8-Aug-03 4:01 
GeneralRe: Shaped Forms | vb.NET Pin
Ray Cassick8-Aug-03 5:09
Ray Cassick8-Aug-03 5:09 
GeneralThank You Very much!! HELPed alot! Pin
Yamarain8-Aug-03 9:10
Yamarain8-Aug-03 9:10 
GeneralHTTPWebRequest Pin
ami-uhle8-Aug-03 1:12
ami-uhle8-Aug-03 1:12 
GeneralExiting from a menu Pin
b_cochofel8-Aug-03 1:02
b_cochofel8-Aug-03 1:02 
QuestionHow to get the line number Pin
Broker20037-Aug-03 22:21
Broker20037-Aug-03 22:21 
AnswerRe: How to get the line number Pin
Dave Kreskowiak8-Aug-03 4:07
mveDave Kreskowiak8-Aug-03 4:07 
GeneralRe: How to get the line number Pin
Ray Cassick8-Aug-03 5:04
Ray Cassick8-Aug-03 5:04 
AnswerRe: How to get the line number Pin
Skippy II17-Aug-03 6:52
Skippy II17-Aug-03 6:52 
GeneralQuick question about classes in VB.NET Pin
CodeChicken7-Aug-03 13:20
CodeChicken7-Aug-03 13:20 
GeneralRe: Quick question about classes in VB.NET Pin
CodeChicken10-Aug-03 8:38
CodeChicken10-Aug-03 8:38 
GeneralRe: Quick question about classes in VB.NET Pin
Csharp™10-Aug-03 9:01
Csharp™10-Aug-03 9:01 
GeneralButton Sizes Pin
totig7-Aug-03 12:16
totig7-Aug-03 12:16 
GeneralRe: Button Sizes Pin
Hesham Amin8-Aug-03 4:03
Hesham Amin8-Aug-03 4:03 
GeneralOLE Databinding Pin
Milancie7-Aug-03 10:01
Milancie7-Aug-03 10:01 
GeneralRe: OLE Databinding Pin
pxw16-Aug-03 6:38
pxw16-Aug-03 6:38 
Generalaccess to outlook inbox Pin
pnpfriend7-Aug-03 9:45
pnpfriend7-Aug-03 9:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.