ms-office

Word Interop Not Working In A Scheduled Task

半腔热情 提交于 2019-12-03 12:57:52
问题 I'm currently developing a script that takes a Word document, opens it up in Word, and then prints the Word file as a PDF. Everything works great when run manually either on my machine or the server. The problem comes in when I attempt to run it as a scheduled task. One of the requirements is that this should be done nightly without any intervention. When I set up a schedule task to do this and set the security options to "Run only when user is logged on" everything works fine. Problem is,

Office add-in ribbons: same tab with 2 addins

吃可爱长大的小学妹 提交于 2019-12-03 12:51:22
I'm trying to make two word add-ins' groups to appear in the same tab (Tools) but they both create unique tabs (there's two 'Tools' tabs). I saw this video but I'm using the Visual Designer, not XML. Can I edit the designer code in some way to make this work? http://blogs.msdn.com/b/vsto/archive/2008/03/10/share-a-ribbon-customization-between-office-applications.aspx Office 2007 Create the Ribbon Create a 2007 Excel, Outlook, PowerPoint, or Word project in Visual Studio. For the purpose of these steps, create a C# project and name the project RibbonStarterProject. Add a Ribbon (Visual Designer

MS Office file diff under TFS

雨燕双飞 提交于 2019-12-03 12:41:56
When you compare two versions of MS Word doc/Excel book in Team Foundation Server Source Explorer, the result is the boring "Binary filles differ" dialog. It does not have to be that way though. The relevant apps (Word/Excel) have an excellent built-in diff interface. You can witness it when you work with versioning-enabled SharePoint file library and do compare with a previous version. Also, TortoiseSVN brings it up when you do diffs. Question - can I enable this in TFS? iammichael You can configure comparison (diff) and merge tools per file type (extension). This is available via Tools ->

Renaming Objects in PowerPoint

∥☆過路亽.° 提交于 2019-12-03 11:33:12
问题 Probably a very stupid question but I can't figure how to rename an object in PowerPoint.. For example, all my Graphs are called by default "Graph 1" etc. Could someone help me on that? Thanks! 回答1: In PowerPoint 2007 you can do this from the Selection pane. To show the Selection pane, click on the Home tab in the ribbon, then click on Arrange and then 'Selection Pane...' at the bottom. The Selection pane will open on the right. (Or press CTRL+F10) To rename an object, first select the object

How to produce documents (docx or pdf) from SQL Server?

别等时光非礼了梦想. 提交于 2019-12-03 11:07:11
I know this is a little subjective, but I'm looking into the following situation: I need to produce a number of documents automatically from data in a SQL Server database. There will be an MVC3 app sat on the database to allow data entry etc. and (probably) a "Go" button to produce the documents. There needs to be some business logic about how these documents are created, named and stored (e.g. "Parent" documents get one name and go in one folder, "Child" documents get a computed name and go in a sub-folder. The documents can either be PDF or Doc(x) (or even both), as long as the output can be

C#: Getting the number of rows/columns with ExcelPackage

♀尐吖头ヾ 提交于 2019-12-03 10:23:25
I need to read and write data from an Excel spreadsheet. Is there a method to finding out how many rows/columns a certain worksheet has using ExcelPackage? I have the following code: FileInfo newFile = new FileInfo(@"C:\example.xlsx"); using (ExcelPackage xlPackage = new ExcelPackage(newFile)) { ExcelWorksheet worksheet = xlPackage.Workbook.Worksheets[1]; } I need to iterate through each cell this worksheet has and spit it into a fairly big table, but I don't want to print out blank cells or get an exception. Is there a method resembling worksheet.rowNum or colNum ? You can get the row and

How to check a cell text is strikethrough or not in .xlsx file using apache poi

十年热恋 提交于 2019-12-03 08:59:26
I need to check the text format of a cell in .xlsx file (Microsoft Excel file) is strike through or not using Apache POI libraries. Look following Image Please Check this image ! I need to check whether B3 Cell text is strike through or not. Finally I found a way to do this, code as follow //Using workbook XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(new File("abc.xlsx"))); //Getting first sheet XSSFSheet sheet = workbook.getSheetAt(0); //Checking A1 cell that strikethrough or not boolean strikeOutStatus=sheet.getRow(0).getCell(0).getCellStyle().getFont().getStrikeout(); System

Creating a multi-level bullet list with Word.Interop

半世苍凉 提交于 2019-12-03 08:52:54
I need to create a multi-level bullet list via Microsoft.Office.Interop.Word and I am currently struggling with its (horrible) API (again). I've just created the following example (not dynamic yet, just for demonstration purposes) in a VSTO document-level project for Microsoft Office Word 2010 in the programming language C#: Word.Paragraph paragraph = null; Word.Range range = this.Content; paragraph = range.Paragraphs.Add(); paragraph.Range.Text = "Item 1"; paragraph.Range.ListFormat.ApplyBulletDefault(Word.WdDefaultListBehavior.wdWord10ListBehavior); // ATTENTION: We have to outdent the

Write a Macro in VBA - excel AFTER the user has closed the Excel

落爺英雄遲暮 提交于 2019-12-03 08:18:45
I need to write a macro in Excel VBA, that terminates a process running in windows tasks AFTER the excel has been closed down. I tried it doing this on event workbook_BeforeClose Private Sub Workbook_BeforeClose(CANCEL As Boolean) Run "MacroCloseProcess" End Sub Where as MacroCloseProcess is defined like this Private Sub MacroCloseProcess() Dim oWMT As Object, oProcess As Object Set oWMT = GetObject("winmgmts://") For Each oProcess In oWMT.InstancesOf("Win32_Process") If (oProcess.name) = pWcfHostApp Then If oProcess.Terminate() = 0 Then Exit Sub End If Next End Sub This works, BUT, if there

How to test Office Add-ins in the online version of Word and excel?

强颜欢笑 提交于 2019-12-03 07:30:20
I am developing an Task Pane Office Add-in using the Office JavaScript APIs in Visual Studio. When you run the application it runs in the desktop client version of Office. The Office Store requirements states Your Add-in for Office must be fully functional with the supported operating systems, browsers, and devices for Office 2013 and Office Online. So I need to test it in the Office online versions too. The problem is I am unable to find a way to load the application in Word/Excel/Powerpoint Online and test it and I also dosen't have a SharePoint setup where I can publish the app test it and