473,386 Members | 1,652 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.

Grab window content.

Hi All,

I'd like to get the content of windows(?), maybe they are MsgBoxes, that pop
up in MS Word, like the ReadabilityStatistics after the Grammar check.

Can I get control to the window that has the results of the grammar check?

So far I am activating it:
---
Private Sub TestMSWordFunc(ByVal file As String)
'MS Word declarations
Dim wordApp_Server As Word.Application
Dim wordDoc As Word.Document
Dim wordRange As Word.Range
Dim wordStatistic As Word.ReadabilityStatistic
Dim wordStatistics As Word.ReadabilityStatistics
Dim wordWnd As Word.Window
Dim wordGrammarDlg As Word.Dialog
'Other
Dim testObject As Object
Dim fileMod As Boolean
Dim activeFile As String
Dim i As Integer
Dim strPropsInfo As String

'Open an application server first
wordApp_Server = New Word.Application
wordApp_Server.Documents.Add()
wordDoc = wordApp_Server.Documents.Open( _
FileName:=file, _
ConfirmConversions:=False, _
ReadOnly:=True, _
AddToRecentFiles:=True, _
Format:=Word.WdOpenFormat.wdOpenFormatAuto, _
Visible:=False)

'Close document that is created when Document is Add()ed
wordApp_Server.ActiveDocument().Close(SaveChanges: =False)
'Activate document selected by the user
wordDoc.Activate()

'Document must be set active in order to retrieve further information
Try
activeFile = wordApp_Server.ActiveDocument.Name()
Catch
MsgBox("There is no active file within the application.",
MsgBoxStyle.Information)
GoTo Cleanup
End Try

'This is the (last) window of the application
wordWnd = wordApp_Server.Windows.Item(wordApp_Server.Windows .Count)
wordWnd.Activate()

wordGrammarDlg =
wordApp_Server.Dialogs.Item(Word.WdWordDialog.wdDi alogToolsSpellingAndGrammar)
wordGrammarDlg.Execute()
<-Here I would like to get a refernce to the window with the
statistics! ->
---
Any ideas and help appreciated.

Kisses and regards
Melanie
Jul 21 '05 #1
0 1250

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dan glenn | last post by:
hi. I want to code a 'preview' function into a guestbook entry page. I can do it with a button that posts, bringing up a whole new page showing a preview of what has been entered, and then the user...
0
by: Baby Blue | last post by:
I have 2 code like below to grab a news website for my site. However, when I click some links (such as : http://wwww.vnexpress.net/xxx/xxxx ) inside the site which I want to grab, it has some...
6
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
12
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
0
by: Mel_la_Bel | last post by:
Hi All, I'd like to get the content of windows(?), maybe they are MsgBoxes, that pop up in MS Word, like the ReadabilityStatistics after the Grammar check. Can I get control to the window that...
8
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the...
1
by: Robert T. | last post by:
I have a PHP script that displays my online status and shows a window if I am online, or doesn't show anything if I am offline. I'd like to include the content of this remote PHP file inside a...
0
by: Grey | last post by:
i need to grab the pdf content. the pdf content has the standard format with data inside. is there any way to 1) grab the table content in pdf format; and then 2) put the data into excel
1
by: helraizer1 | last post by:
Hi folks and folksesses, In the GD2 library there is a function called 'imagegrabscreen()' and 'imagegrabwindow()', which captures a screen dump of the current window, or another one specified by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.