Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2004

Tip: Looking for answers? Try searching our database.

Office Add-in. Trapping/Redirecting CTRL-S

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 22 Oct 2004 23:21 GMT
Built an Office Addin with .net 2003. I have captured the save and save as
menu options so I can run my own code before the regular save function
executes. However, I have not been able to figure out how to do the same with
CTRL-S. Does anyone have any ideas?

Thanks
Jason
Gary Chang[MSFT] - 23 Oct 2004 09:48 GMT
Hi Jason.

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.

Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
"Peter Huang" - 25 Oct 2004 06:34 GMT
Hi Jason,

I think you may try to catch the Workbook_BeforeSave event and if you do
not want to do the save, you may just set the cancel to true will prevent
the saving operation.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
MsgBox "hellO"
Cancel = True
End Sub

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jason - 25 Oct 2004 08:21 GMT
We're thinking alike..:) I'm having a problem with setting up a reference to
the FrontPage Application object with events..If declared as an object I can
manipulate menu options, toolbars etc...When I Create an appobj with events
and set it during the onConnect event the Toolbar functions fail...

Very weird...Any ideas? Slightly off track but this is stopping me at least
try...

Thanks
Jason

> Hi Jason,
>
[quoted text clipped - 14 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" - 26 Oct 2004 08:35 GMT
Hi

Are you using VB.NET?
I think you may try to use the Addhandler method.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/
vastmAddHandlerStatement.asp

Also can you post your code and detailed reproduce steps so that we can do
further troubleshooting.

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Jason - 26 Oct 2004 16:49 GMT
Thanks Peter, I have figured it out. The problem was that the PIA for Office
2003 was broken and my install was using the local Interop. Once I reparied
my office install and repointed to the correct objects the Application
declaration with events functions just fine...I then used the beforePageSave
Event to launch my code before the save happens...:)  I'm very happy with the
solution, thanks for your help...

Jason

> Hi
>
[quoted text clipped - 13 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" - 27 Oct 2004 04:32 GMT
Hi

I am glad that the problem has resolved.
Cheers!

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.