Office Automation :: .net 2010 Application Does Not Run On All Computers
Jan 4, 2012
I have an VB.NET 2010 application using framework 4 that has issues with reading and writing to cells using command similar to 'RequiredSoftwareVersion = EmployeesSheet.Cells(37, 4).value'. The big thing is I can open/close the workbook, select which worksheet in the workbook. On some computers it works fine, on others I get a pop-up that asks if you want details, continune, quit. All the computers have Office 2007 installed.
View 4 Replies
ADVERTISEMENT
Dec 21, 2010
I've made Add-in for Word 2007 in VS2005.It worked well with Word 2007 and now it works well with Word 2010 32 bit.However it doesn't work with Word 2010 64 bit. The installation is successful, but the ribbon button doesn't show up.
Do you have any experience with add-ins for Office 64 bit?
View 5 Replies
Mar 24, 2009
I would like to open a file in an application using vb.net 2008. I am unsure which namespace to use. I do not want to assume it is the current associated application. I believe there should be a way to...
Dim app as something
Open a file in that app
View 5 Replies
Jul 30, 2009
I know how to program this task easily using vb.net, only because i had to do a similar task a few seasons ago. However, when I confronted this task last week my previous solution did not work.Here is my code.Code:'using VS 2005 so i added the COM reference: Microsoft Excel 10.0 Object LibraryDim xlApp As Excel.ApplicationDim xlWorkBook As New Excel. the .Net Office Automation forum
View 8 Replies
Feb 14, 2009
It appears that when one creates an instance of Excel, using CreateObject, (Late binding), the suggested Excel closing function (with GC.collect etc) does not work. I have tried several suggestions, and the only one that works is process.kill method. Do you see any problem in using this? BTW: the reason we are using late binding is that we cannot use Office PIAs....not sure which version of Office would be installed on the client site. We work with O2003, but the client might still be at 2000 or 2002.
View 7 Replies
Apr 15, 2009
I have an application, running multiple threads, and in many of these threads, Outlook is being called, some mails read, attachments downloaded, and then the outlook instance closed. But it is possible that there are a number of threads trying to do the same thing at the same time. There is of course a lock at the beginning and end of the process, so that no two threads try to access the outlook application at the same time.
"Sometimes" i get an error message : Creating an instance of the COM component with CLSID {0006F03A-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010108
View 3 Replies
Jul 13, 2010
I am using visual studio to create an application that opens an excel file and then for each entry in the first column the entry in the second column is stored in an array. Then excel opens two other workbooks and for each entry in the first column it searches for a match in these other two workbooks and stores the corresponding value in an array.
Anyway, the problem is closing excel afterwards. I have used the thread: [URL] to work through the basics of cleaning up. I used the cleanup code provided and added the WithEvents caveat. I do not have strict option on.
I believe the problem is the fact that I have three workbooks open.
This is my cleanup code: (wrkbk, wrkbk2, wrkbk3 are the workbooks; datasheet, datasheet2, datasheet 3 are the worksheets; excel is the application)
Code:
GC.Collect()
GC.WaitForPendingFinalizers()
GC.Collect()
[Code]....
I got the impression that order was important in the cleanup procedure so I have tried some variations of moving the workbooks and worksheets around.
View 1 Replies
Nov 23, 2010
Using VB2008 on a W7 system equipped with Office 2010, I added a reference to Microsoft.Office.Interop.Word (The Office12 version, not sure if this is OK). Then I have the following code:
Imports Microsoft.Office.Interop
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim WordApp As Word.Application
[code]....
But all I keep getting is an exception on the CreateObject line indicating "Cannot create ActiveX component". I don't think it likes the "Word.Application" statement for some reason. Is this because I'm using Word2010?
View 8 Replies
Sep 22, 2010
I have created a picturebox in a form that I want to click on and then it would send me to a excel file that I already have created. I don't know if it is even possible. Do I need to use a button instead?, or am I just way off all together.
View 2 Replies
Jan 25, 2011
I have written an automation addin in Excel with C# (addin.dll). To use the addin, I need to 1. register it using "regasm /codebase c:...addin.dll"2. select in ExcelOptionsAddInsExcel AddinsAutomation the respective addin from the list
I would like to automatize 1) and 2), so that the user just needs to run an exe-file in order to use the addin. 1) should be no problem, but how can one automatize 2)?
View 12 Replies
Apr 20, 2010
Ok basically what I need to do is the following:Read FirstExcelDoc (attached)For every row in that: Retrieve data from sql server db based on info in the Orange columns of FirstExcelDoc Let's say I retrieved data elements A, B, C, D, and E from sql server. Then I need to enter those same data elements A, B, and C in another excel spreadsheet (which has formulas etc) After inputing A, B, and C in that spreadsheet, read a couple of calculated fields and compare those results to data elements D and E retrieved originally from SQL Server DB. Finally, output the results in the Blue columns of the FirstExcelDoc spreadsheet for that row.Loop through and do the same thing for row 2 of the FirstExcelDoc and keep on until you see "END TEST" in the FirstExcelDoc.
I'm looking for a method of doing this efficiently. I have read several articles over the past few days as well as those from Mike R. but just need some direction to get started on this.To start of I'm looking for whether to read the entire FirstExcelDoc spreadsheet or just read the info for first policy number(2nd row) and process it and write out the blue column info for that row and then loop through and come back and read the second policy number (3rd row) etc... Please attach a code snippet for either way of reading the data.
View 19 Replies
Jun 17, 2009
I'm using excel via interop in application.Sometimes users kill application that created excel instance and that results in excel instance sitting in memory without any chance of disposing it.First I tried to tackle this using ROT(running object table) looks like not all instances of excel are registered there.Than I tried to somehow mark excel process after it is started via interop.[code]This works as long as excel is visible but in my case excel window is invisible.All I need is to somehow mark process that started via automation with the parent PID, so that later I can kill it if parent does not exist.
View 19 Replies
Apr 16, 2010
I have successfully automated a PowerPoint Metrics presentation with VB.Net. However, since there were many complicated calculations, it took quite some time to make the 120+ slide presentation - so I recently tried to revamp the application to be multi-threaded.
[Code]...
View 1 Replies
Jan 21, 2012
I've got VS2008 and Office2010, but I don't have Office2007. Therefore, I have the Word14 Object Library but not the Word12 Object Library. Will the code that I create for Office2010 automation also work where clients only have Office2007 or will they have to upgrade their office suites?
View 1 Replies
Dec 17, 2010
I have been pulling my hair out trying to fix this.
[Code]....
View 1 Replies
Jun 1, 2010
We have a vb program which is run on our server by scheduled task every day. The program opens about 30 excel files, refreshes the data connections, pivot tables and then saves the document in another location.
This may run fine for a couple days but sooner or later the process starts crashing, usually with this error: RPC_E_SERVERFAULT.
My question is, Is it expected that continually opening/closing/refreshing workbooks will inevitably cause the Excel object to crash at some point.
View 3 Replies
Mar 28, 2011
i was wondering if someone could give me the final explanation on what i might be doing wrong here.I spent a lot of time reading around the net and the forum about how to add Threading capabilities to a VB project.
Nos, i've got .NET 4 installed, and i've added the system.tsr and mscorlib.dll files as reference in, say, Excel 2007 (see screenshot).However, when i try to make a thread with anything as basic as "Dim Thread1 As System.Threading.Thread", i get a user-defined type not found error.Indeed, when i use the object browser to see what's in the System file, theres nothing remotely linked to any Threading, and in the mscorlib file, nothing under "Threading" either, just a few Thread related functions, but nothing defining a data type
View 2 Replies
Feb 15, 2011
I've developed shared addin for Microsoft Word. I distribute this addin with my application and using Inno setup for installation. The Inno setup installs my application and then runs "myAddin.msi" file in order to install addin.
how to uninstall this addin programatically?
Right now, in order to uninstall addin, the user has to to it manually through control panel.
View 2 Replies
Jul 25, 2010
how do i use the webbrowser to display the word or excel docs. just like the pdf viewer... i tried the webrowser1.navigate but it didnot work, if it does its opening a new window, im using office 2010..
View 4 Replies
Nov 27, 2011
How do I use the webbrowser to display the word or excel docs. just like the pdf viewer. I tried the webrowser1.navigate but it didnot work, if it does its opening a new window, I am using office 2010.
View 1 Replies
Sep 25, 2009
I'm having an issue where my excel.exe process doesn't close until I close my .net application. I'd like to avoid using Process.Kill() if at all possible.
Code:
Private Sub WriteRowsToXls(ByVal rows As DataRowCollection, ByVal xlsPath As String, ByVal showStatus As Boolean, Optional ByVal AddTotals As Boolean = True)
Dim xlsApp As New Microsoft.Office.Interop.Excel.Application
[CODE]............
This method references a couple of other methods I use for repeated formatting tasks, I'll include those methods below. (I added the FinalReleaseComObject into the other methods after reading Mike's thread but the issue persists)
Code:
Private Sub SetRangeValidation(ByVal rng As Range)
With rng.Validation
.Delete()
[CODE]..............
Method SetRangeAllBorders does about the same as these other methods but my post is too long to add it. The only other things not shown in these code snippets are a few string variable that are defined in the class, studentWS, studentsWSPW, paymentsWS and paymentsWSPW My App creates an instance of the class, loads some data, runs the method above, and then sets the class to nothing. I'm using .NET 3.5 automating Excel 10
View 2 Replies
Aug 13, 2011
I wrote a simple Automation Addin using VB.NET and .NET 4 and want to distribute it's dll to a
computer with xp sp2 and Office 2007 (Excel 2007) without I install .net on that computer, is it
possible?
View 2 Replies
Oct 20, 2011
This might seem a ridiculous question but I just want to make 100% sure before I start committing any funds to software purchases. Can I use VB2008to develop automation routines to control Office2010 applications or must I absolutely use VB2010 to do so?I ask this because I installed an Office 2010 pro on my station which already has VB2008 and I do not have any Word14 reference in the COM section of the list of references...
View 1 Replies
Sep 8, 2011
I have used VB.NET and Microsoft Offices Interop to create an application that will run on a server and will print files for different users.My problem is that I need to find a way to impersonate different users so that when MS Word opens and prints, the resulting print job is recorded under that user. I found this link that lets you run .net code as a different user - unfortunately it doesn't work with this code. The username recorded is still the user that is logged on the server.Code Removed by moderator. Any ideas how I can make the Office app I'm automating run under a different user to the .net program that is calling it?
View 2 Replies
Oct 21, 2011
I would like to create Shared add-in that works with Word, Excel, Outlook and Power Point. I've found nice article that provides step by step instruction for creating shared add-in for Word: [URL] I've followed instructions and it worked. However, I am looking for a way to create one add-in that works with Word, Excel, Outlook and Power Point, not only Word. I didn't find any reference on the WEB.
View 7 Replies
Oct 30, 2009
Trying to Automate the VBA code from C#, the existing VBA code is a legacy code which has hundreds of nested calls within.Automate these VBA routines from C# and during the Automation there could be some COM objects which needs to transacted between VBA and C#.COM Objects currently have a Interoperability wrappers to C# and they are being developed in VB and C++?
View 2 Replies
Jun 13, 2012
I've been researching a problem and am so overloaded I'm really lost now. I have to produce an insane amount of reports at work, different day, times.. You get the point. What I'd like to do is create an application where I can:
The windows application would be running all the time .At specific days and times, the application would sent an MS Excell file in Outlook as an attachment
All automatically. If I can get this working, I plan on adding a GUI to the application allowing many reports, at times and days I can set on the screen.
I'm not even sure if this is even possiable.If my application is too hard for a 5th grader to run, I've made too complicated"
View 3 Replies
Sep 16, 2007
I have a excel VBA program that extract data from bloomberg (when run on bloomberg enabled workstation). Currently thinking about converting the application from VBA to c#.net application that i can have a better control of the application.
I need some advice on the license issue of creating a intranet web service that draw data from Bloomberg (web service setup on bloomberg enable station).
Another problem i face is it very hard to find example or articles regarding this issue.where i could have a good grab on dealing with bloomberg API?
View 9 Replies
Jan 5, 2010
I have been going around and around about this and just can't seem to find the answer. I have an Access 2007 DB with 3 Tables I pull data from the first (STUDLIST) table to my form, I then pull data from the second(EQUIPINV) Table
complete my form, I now want to take my form data and create a new row in my third table(SignedOutEquipment)....(Yes I know that is duplicating data but overall it rally is not, there are reasons to do it this way) but this is where I am having my problem, My code runs with no errors and tells me it added a record but when I check my access DB there is no new record.
I am using visual Studio 2008 Express and access 2007[CODE...]
View 2 Replies
Jul 28, 2010
How do I get in VB2005 the last row in a open excel sheet that contains data
View 1 Replies