Click here to Skip to main content
15,892,927 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Matlab to VB.net Pin
Dave Kreskowiak7-Jul-10 4:28
mveDave Kreskowiak7-Jul-10 4:28 
QuestionHelp needed in hooking MS Office File Open/Save Dialog ......... Pin
Dinakara K7-Jul-10 0:06
Dinakara K7-Jul-10 0:06 
AnswerRe: Help needed in hooking MS Office File Open/Save Dialog ......... Pin
Simon_Whale7-Jul-10 0:18
Simon_Whale7-Jul-10 0:18 
AnswerRe: Help needed in hooking MS Office File Open/Save Dialog ......... Pin
thatraja7-Jul-10 2:40
professionalthatraja7-Jul-10 2:40 
GeneralRe: Help needed in hooking MS Office File Open/Save Dialog ......... Pin
ChandraRam7-Jul-10 4:04
ChandraRam7-Jul-10 4:04 
GeneralRe: Help needed in hooking MS Office File Open/Save Dialog ......... Pin
thatraja7-Jul-10 6:23
professionalthatraja7-Jul-10 6:23 
GeneralRe: Help needed in hooking MS Office File Open/Save Dialog ......... Pin
Dinakara K7-Jul-10 21:09
Dinakara K7-Jul-10 21:09 
AnswerRe: Help needed in hooking MS Office File Open/Save Dialog ......... Pin
Sonhospa7-Jul-10 8:16
Sonhospa7-Jul-10 8:16 
OK, VC is far from what I can tell you about, but a first (language-independent) idea for getting the MSOffice-File might be to query the running processes and check for the respective process' ProcessName and MainWindowTitle properties.

In VB.NET and for Excel it could be like
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim ProcessList As System.Diagnostics.Process()
    Dim Proc As System.Diagnostics.Process

    ProcessList = System.Diagnostics.Process.GetProcesses()
    For Each Proc In ProcessList
        If Proc.ProcessName = "EXCEL" Then
            Debug.WriteLine(String.Format("Name {0} ID {1}", Proc.ProcessName, Proc.Id))
            Debug.WriteLine(String.Format("Main Excel worksheet is {0}.", Proc.MainWindowTitle))
        End If
    Next
End Sub
For listening to Offices events (e.g. when 'SaveAs' dialog is opened) I'm afraid you might have to write a 'COM-AddIn'. Just Google for that keyword, there are good C++ samples available which you can easily adapt to your needs (with or without VSTO). Be aware that the COM-AddIn has to be registered on the target machine, so you would need administrator access rights to install it.

If you write a COM-AddIn, then of course the first part of this is obsolete. Within an AddIn you can reference the Microsoft.Office.Interop libraries and access the Office-Applications as objects, exposing their vast number of members.

Hope that helps you a bit.
Regards to Beautiful India from Germany Wink | ;-)
GeneralRe: Help needed in hooking MS Office File Open/Save Dialog ......... Pin
Dinakara K11-Jul-10 20:03
Dinakara K11-Jul-10 20:03 
QuestionProblem accessing Resourses and Settings in visual studio 2008 Pin
Аslam Iqbal6-Jul-10 23:26
professionalАslam Iqbal6-Jul-10 23:26 
AnswerRe: Problem accessing Resourses and Settings in visual studio 2008 Pin
Dave Kreskowiak7-Jul-10 1:28
mveDave Kreskowiak7-Jul-10 1:28 
GeneralRe: Problem accessing Resourses and Settings in visual studio 2008 Pin
Аslam Iqbal7-Jul-10 1:42
professionalАslam Iqbal7-Jul-10 1:42 
GeneralRe: Problem accessing Resourses and Settings in visual studio 2008 Pin
Dave Kreskowiak7-Jul-10 2:51
mveDave Kreskowiak7-Jul-10 2:51 
GeneralRe: Problem accessing Resourses and Settings in visual studio 2008 Pin
Аslam Iqbal7-Jul-10 4:28
professionalАslam Iqbal7-Jul-10 4:28 
QuestionCommunication with Finger Print Machine [modified] Pin
εїзεїзεїз6-Jul-10 21:49
εїзεїзεїз6-Jul-10 21:49 
AnswerRe: Communication with Finger Print Machine Pin
Steven J Jowett7-Jul-10 0:41
Steven J Jowett7-Jul-10 0:41 
AnswerRe: Communication with Finger Print Machine Pin
Dave Kreskowiak7-Jul-10 1:26
mveDave Kreskowiak7-Jul-10 1:26 
GeneralRe: Communication with Finger Print Machine Pin
εїзεїзεїз7-Jul-10 1:36
εїзεїзεїз7-Jul-10 1:36 
GeneralRe: Communication with Finger Print Machine Pin
Dave Kreskowiak7-Jul-10 2:49
mveDave Kreskowiak7-Jul-10 2:49 
QuestionHow find unmanaged dll methods? Pin
Sonhospa6-Jul-10 1:13
Sonhospa6-Jul-10 1:13 
AnswerRe: How find unmanaged dll methods? Pin
ddecoy6-Jul-10 1:33
ddecoy6-Jul-10 1:33 
GeneralRe: How find unmanaged dll methods? Pin
Sonhospa6-Jul-10 2:38
Sonhospa6-Jul-10 2:38 
AnswerRe: How find unmanaged dll methods? Pin
Dave Kreskowiak6-Jul-10 1:48
mveDave Kreskowiak6-Jul-10 1:48 
GeneralRe: How find unmanaged dll methods? Pin
Sonhospa6-Jul-10 2:30
Sonhospa6-Jul-10 2:30 
QuestionExcel to XML Conversion using VBA Pin
priyaahh5-Jul-10 18:55
priyaahh5-Jul-10 18:55 

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.