Catching "Save..." and "Save As..." from other applications (Office suite)

Hello,
  I would like to create an app with delphi (RadXE) that:
- catch the "save..." and "save as..." from other applications, in particular MS-Office suites (but also other apps)
- get some data from a dialog form before saving etc...
- then going quiescent waiting for the next "save" or "save as..." event...

I thought a way could be launching the external app by my delphi application getting handles to it, but I don't know how to catch events.

Anybody can help me? (I am sure of yes! :)

thanks in advance,
Filippo
__________________
Filippo Forlani
www.filippoforlani.org
0
Filippo
12/14/2010 6:18:05 PM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

3 Replies
1158 Views

Similar Articles

[PageSpeed] 41

<Filippo Forlani> wrote in message news:314023@forums.embarcadero.com...

>  I would like to create an app with delphi (RadXE) that:
> - catch the "save..." and "save as..." from other applications,
> in particular MS-Office suites (but also other apps)

For apps that use the Win32 API GetSaveFileName() function to display a 
standard OS save dialog, you would have to write a DLL that hooks into every 
running process via the Win32 API SetWindowsHookEx() function, and then the 
DLL can patch the process's PE Imports table to hook into the 
GetSaveFileName() function.

However, Vista introduces new dialogs that are exposed via COM objects 
instead of API functions (in this case, the IFileSaveDialog interface).  To 
hook those dialogs, you would have to change the COM object registration in 
the Registry (which you are likely to be locked out of) to delegate that COM 
object to your custom DLL.  That way, when the COM object is instantiated by 
any app, your DLL is called first, and then it can forward any requests to 
the real IFileSaveDialog dialog as needed.

Lastly, Office does not use standard OS dialogs either way, so you would 
have to hook those dialogs manually using low-level Win32 API tricks, like 
CBT hooks and subclassing.

> - get some data from a dialog form before saving etc...

What kind of data exactly?  Different dialog types expose different kinds of 
data in different ways.

-- 
Remy Lebeau (TeamB)
0
Remy
12/14/2010 9:02:34 PM
Thank you Remy,
I try to explain better what I would like to do, hoping the solution would be simpler! :)

My idea is to catch 'Save' and 'Save as...' of office (and for example AutoCAD...) and then, after saving as the app wants, ask some datas, (revision number, author, state... etc...) to insert into a database... something like an ECM.

Hope I am more clear now, so, for example in Word:
a- I write something
b- I click save
c- word ask me with its dialog (normally), the name of the file
d- I press save from the word's dialog and save the file
e- my app catch the word's "save", then shows a dialog asking me some more datas (author, revision number etc.)
f- my app will send these datas as a record into a database

My problem is to implement point "e"...

thanks in advance,
Filippo
_________________
Filippo Forlani
www.filippoforlani.org



> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> <Filippo Forlani> wrote in message news:314023@forums.embarcadero.com...
> 
> >  I would like to create an app with delphi (RadXE) that:
> > - catch the "save..." and "save as..." from other applications,
> > in particular MS-Office suites (but also other apps)
....
> > - get some data from a dialog form before saving etc...
> 
> What kind of data exactly?  Different dialog types expose different kinds of 
> data in different ways.
> 
> -- 
> Remy Lebeau (TeamB)
0
Filippo
12/15/2010 6:49:55 PM
<Filippo Forlani> wrote in message news:314321@forums.embarcadero.com...

> I try to explain better what I would like to do, hoping
> the solution would be simpler! :)

Sorry, but what you have described does not change my earlier reply.  You 
are looking at a lot of manual hooking to accomplish what you are 
attempting.

-- 
Remy Lebeau (TeamB)
0
Remy
12/18/2010 10:51:07 AM
Reply:

Similar Artilces:

Not working in Firefox 3.1b2: "Save Image As", "Save Link As", and "Save Page As"
Name: Thaddeus Polit Email: ThaddeusdotPolitatlmcodotcom Product: Firefox Release Candidate Summary: Not working in Firefox 3.1b2: "Save Image As", "Save Link As", and "Save Page As" Comments: Firefox 3.1b2 - When I click "Save Image As", "Save link As", or "Save Page As", nothing happens. The "Save As" dialog does not appear. Due to this problem, I have been forced to start using I.E. Yuck! Please help! Sincerely, Thaddeus Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) G...

"save session", "don´t save"... "abort"!
Name: lumpi Product: Firefox Summary: "save session", "don´t save"... "abort"! Comments: There should be a third "abort/cancel" button in the "save session" dialog for tabbed browsing. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

while saving the file "Save as Type" in SaveDialogBox shows "MicrosoftExcelSheet" and "AllFiles", how can i restrict "AllFiles" and show only "MicrosoftExcelSheet" ..
Below is code written for opening XLFile.  HttpContext.Current.Response.Clear();HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + astr_FileName); HttpContext.Current.Response.AddHeader("Content-Length", abyte_Data.Length.ToString()); HttpContext.Current.Response.ContentType = astr_ContentType; //octet-stream"; or //"application/vnd.ms-excel"; HttpContext.Current.Response.BinaryWrite(abyte_Data);    Udaya.M...

"save as" and "save link as" dialog flickers
On a new Mandriva 2007.1 system Firefox 2.0.0.3 and Seamonkey 1.1.1 both have a glitch in the "save as" (for an open page) and "save link as" (Firefox)/ "save link target as" (Seamonkey) for right click on a link dialogs. When the dialog comes up it's like there are two copies and it is flickering back and forth between them rapidly. Or possibly the dialog is resizing itself quickly. The "two" dialogs are vertically aligned but the right edge jumps back and forth. Identical copies of these two browsers did NOT do this on Mandriva 2006...

Linking Ability with "Save As" or "Save As PDF"
Name: STUART HASSEL Email: StuartHasselatgmaildotcom Product: Firefox Summary: Linking Ability with "Save As" or "Save As PDF" Comments: The reason I mostly use Safari is that it has the ability of linking anything that I save to my desktop. If I'm, say, doing a search using something like Google, I can click on various links at the moment but if I want to be able to do that later I can't so I copy my search word(s) or phrase onto Google using Safari and then just make the search page into a "document" and park it on my desktop. I can a...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

Why does opening of "Save" or "Save As" window take so long?
Name: Mike Cleven Email: mikecleven_at_gmail.com Product: Firefox Summary: Why does opening of "Save" or "Save As" window take so long? Comments: Unlike other programs, which bring up the whole contents of a directory quickly, Firefox (and Mozilla in its raw state) takes its time adding one directory item after another; such that you can wait quite a while to actually hit the "save" button, especially if you have to scroll to the right for any reason (e.g. looking for a subdirectory etc). Wondering why this is....I had a look at your bugs and p...

"Append to" instead of "Save to"
Hi, When saving a message to a file, the file will be overwritten if it already exists. Does any one know a way to append to the file instead of overwriting it? Thanks. J. J. Cagnol wrote: > Hi, > > When saving a message to a file, the file will be overwritten if it > already exists. Does any one know a way to append to the file instead > of overwriting it? > > Thanks. > J. No, but you could just set up a temporary folder within Mozilla if you wanted to save multiple messages to a file. The mbox format which Mozilla uses simply has multiple m...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

"Save all" "Detach all" and "Delete all" always appear greyed out
Something went wrong with my TB and suddenly a couple of attachment-related options always appear greyed out when I read an email with an attachment! "Save all" "Detach all" and "Delete all" I am sure I have used these in the past. Either an update or an addon must have screwed things up. Any sugesstions? -- Rahul Rahul wrote, On Saturday 07 February 2009 02:57 AM: > Something went wrong with my TB and suddenly a couple of attachment-related > options always appear greyed out when I read an email with an attachment! > > "...

superreview granted: [Bug 416063] "Save this password?" dialog has "Never Save" focused instead of "Don't Save" with FKA on (again!) : [Attachment 304041] fix
Mike Pinkerton (not reading bugmail) <mikepinkerton@mac.com> has granted Stuart Morgan <stuart.morgan@alumni.case.edu>'s request for superreview: Bug 416063: "Save this password?" dialog has "Never Save" focused instead of "Don't Save" with FKA on (again!) https://bugzilla.mozilla.org/show_bug.cgi?id=416063 Attachment 304041: fix https://bugzilla.mozilla.org/attachment.cgi?id=304041&action=edit ------- Additional Comments from Mike Pinkerton (not reading bugmail) <mikepinkerton@mac.com> sr=pink ...

superreview requested: [Bug 416063] "Save this password?" dialog has "Never Save" focused instead of "Don't Save" with FKA on (again!) : [Attachment 304041] fix
Stuart Morgan <stuart.morgan@alumni.case.edu> has asked Mike Pinkerton (not reading bugmail) <mikepinkerton@mac.com> for superreview: Bug 416063: "Save this password?" dialog has "Never Save" focused instead of "Don't Save" with FKA on (again!) https://bugzilla.mozilla.org/show_bug.cgi?id=416063 Attachment 304041: fix https://bugzilla.mozilla.org/attachment.cgi?id=304041&action=edit ...

"-" not "_"
I wrote a SQL statement in the data tab. I wrote a bunch of alaises as example ' word-type ' but when I hit the layout tab it converts the "-" to "_". So now my field name is ' word_type '. Is there any way to prevent this? CardGunner Don' use a hypen ( - ).  It isn't a valid character for column names.   See http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1188931,00.html   Here's an excerpt about column names: Letters as defined in the Unicode Standard 2.0 Decimal numbers from either B...

Web resources about - Catching "Save..." and "Save As..." from other applications (Office suite) - embarcadero.delphi.win32

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Would you give up chocolate for better application performance?
Application performance is critical to business performance according to 98 percent of businesses, yet 89 percent of executives say the poor ...

Gun Sales, Concealed Permit Applications Surge After San Bernardino
The day after Syed Farook and Tashfeen Malik opened fire in San Bernardino, gun sales and concealed carry permit applications surged.

MBA: Mortgage Applications Increase in Latest MBA Weekly Survey, Purchase Applications up 29% YoY
From the MBA: Mortgage Applications Increase in Latest MBA Weekly Survey Mortgage applications increased 1.2 percent from one week earlier, ...

Falling Costs, Rising Applications Will Boost US Energy Storage Market
... in 2013 to 3,659MWh by 2020 on improving economics and policy developments, predicted GTM Research's Shayle Kann Falling Costs, Rising Applications ...

Mortgage applications down 0.2%
Mortgage interest rates haven't moved much in the past three weeks, but they are holding at a higher level than for all of 2015.

California Film & TV Tax Credits Applications Dip In New Small Screen Round
With production on the uptick in the home of Hollywood , the second round of those seeking small screen Golden State tax credits saw 32 applications ...

Digitimes Research: China touch panel makers increasing investments in niche products and large-size ...
The China International Touchscreen Exhibition (C-Touch) was recently held in Shenzhen, China, featuring a number of local and international ...

Six internet-of-things applications in big new government trial
Manchester, England, is set to be the UK demonstrator city for internet-of-things innovation. Of course, there is much smart technology already ...

New patent application suggests Nintendo’s NX console is like nothing we’ve seen before
Nintendo has been close-mouthed about its plans for the Nintendo NX, but a recent patent filing may have tipped the company's hand. If so, then ...

Resources last updated: 12/14/2015 11:16:42 AM