473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

urgent help code ArcGIS addin of spell check using vb.net

Hi

I am trying to use vb.net to create apell check add in to ArcMap 10. I have finished code, but do not know why it does not works. need urgent help

here is my code:

Public Sub SpellCheck()
Dim pDoc As IMxDocument
pDoc = My.ArcMap.Document
Dim pGC As IGraphicsContainerSelect
If pDoc.ActiveView Is pDoc.PageLayout Then
pGC = pDoc.PageLayout
Else
pGC = pDoc.FocusMap
End If
Dim pTE As ITextElement

pTE = pGC.SelectedElement(0)

Dim sz As String
sz = pTE.Text
Dim wdApp As Microsoft.Office.Interop.Word.Application
Dim wdDoc As Microsoft.Office.Interop.Word.Document

wdApp = New Microsoft.Office.Interop.Word.Application
wdDoc = wdApp.Documents.Add
wdApp.Selection.Text = sz
wdApp.Dialogs(wdDialogToolsSpellingAndGrammar).Sho w()
' if the Cancel button is clicked, there will be one character
If Len(wdApp.Selection.Text) > 1 Then
pTE.Text = wdApp.Selection.Text
Else
wdApp.Quit()
wdApp = Nothing
Exit Sub
End If
wdDoc.Close(wdDoNotSaveChanges)
wdApp.Quit()
wdApp = Nothing
pDoc.ActiveView.Refresh()
End Sub




Thanks a lot!!!!!
Dec 11 '11 #1
1 1817
kadghar
1,295 Expert 1GB
I'm not prety sure how ArcMap works but i can't find in your code where you actually open the doc. Perhaps something like:

wdDoc = wdApp.Documents.Add(pDoc)

should work.
Dec 13 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Andrew | last post by:
Full source code is found on the following site. http://fun-time.8m.com/VB-WordSpellCheck.html
2
by: eddie wang | last post by:
Hello, I inherited an Access application from a previous coworker. It seems the Spell Check is never enabled unless I open the application by holding down the shift key and double clicking the...
1
by: tshad | last post by:
Is there something set up that you can call to spell check a textbox? Thanks, Tom
1
by: dinoo | last post by:
I would appreciate if some one can help me out. We are using Microsoft Word's spell check functionality in one of our web pages based on the requirement. We are using Microsoft PIA assemblies to...
12
by: Ryan | last post by:
Is there anyway to enable spell-checking for user input in a Text Box? Either auto spell-check or create a spell-check button. Using VB 2005.
0
by: ovaisrkhan | last post by:
I want to implement spell check control which will check spelling mistakes in text item and provide suggested words in case of mistakes. I urgent need soluion for this. Thanks Sham
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I am using vs2005 and was wondering if .net has any spell check capabilities in web applications built with vs2005, thanks. -- Paul G Software engineer.
3
by: John Wright | last post by:
I have a VB program that will be generating documentation that will be stored for 60 years. This program really needs to have spell check and I read the post below on using spell check. I was...
0
by: progvar | last post by:
hi i am getting probleum in converting a spell check progrma made in vb 6.0 and Ms-office Word into OpenOffice Word when i made spell check program in Ms-Word and vb 6.0 it works fine but i use...
0
by: alnino | last post by:
I have set up a form to autocomplete fields via comboboxes. Unfortunately, my vb code to spell check the current record will not check the comboboxes. Is there a way to call the associated table...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.