View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Wei-Dong Xu [MSFT] Wei-Dong Xu [MSFT] is offline
external usenet poster
 
Posts: 120
Default OfficeXP PIA compatibility

Hi Carol,

Thank you for replying and more information regarding your scenario!

With the help of office PIA, we can develop office solution in .Net. however, Office PIA just takes advantage of .net and com interop to cross the
boundary of .net ( managed code ) and com component ( belongs to un-managed code ). The runtime-callable wrapper builds the communication
between .net and com. This is to say, we still need to follow the old office development restriction.

After checking your codes, I found that you use new keyword to create some objects which is not supported by the Office object. We can't create
one new workbook. This is the reason why runtime throws error to you. There is one KB article which illustrates how to automate Excel in VB.net. I
think this kb artile will help you a lot on this issue. Please go to:
301982 HOWTO: Automate Microsoft Excel from Visual Basic .NET
http://support.microsoft.com/?id=301982

For the Range object, I'd suggest you will find it from Visual Studio.Net object viewer. You can run it from "View-Object viewer" in visual studio or
press "Ctrl+Atl+J". Then in the namespace Microsoft.Office.Interop.Office, you will find the range interface from there.

Please feel free to let me know if you have any further questions.

Does this answer your question? Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.