office-interop

Microsoft Excel Application" in dcomcnfg not exist

蹲街弑〆低调 提交于 2021-02-05 09:57:06
问题 Although office 2010 is installed on my pc there is no " Microsoft Excel Application " in dcomcnfg.. I'm not able to find it there. I reinstalled Office 2010 also, but still I couldn't find it there 回答1: To correctly configure 32-bit DCOM applications for remote activation, follow these steps: From a command line, enter the following: C:\WINDOWS\SysWOW64>mmc comexp.msc /32 You should be able to see "Microsoft Excel Application" in the list. However, if the entry is still missing after taking

Import Array list to excel format with out using for loop in C#

跟風遠走 提交于 2021-01-29 14:50:39
问题 E.g. I have huge number of data in my list, I done it using for loop. But taking more time to import the data into excel. I tried below code with out using for loop. But i'm getting below error in range.set_Value. Error:An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll Additional information: Exception from HRESULT: 0x800A03EC List<myobj> NGDetailsList = new List<myobj>(); NGDetailsList.Add(new myobj { name = "AAA", designation = "test" });

Office server-side Automation still possible with Office 365?

强颜欢笑 提交于 2021-01-29 10:12:28
问题 I have an ASP.NET Webforms Application where the user can create reports with server-side office Automation. It basically works with FormFields that are being filled out and in the end the user gets a download with the Office document. The Application is quite old and I did not design this software. I'm also aware of the side effects of office server Automation and this article: https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office It just works

Word Interop: how to insert a citation field?

夙愿已清 提交于 2021-01-29 07:12:44
问题 I have a Selection and would like to use it to insert a citation. Currently, I insert an index mark using Selection sel; : string cmd = "Lincoln, Abraham"; document.Indexes.MarkEntry(sel.Range, Entry: cmd); I'm thinking that inserting a citation would be similar, but am not seeing the equivalent of Document.InsertCitation() or Document.Bibliography.InsertCitation() ? 回答1: Try TableOfAuthorities ?? That works in VBA Document.TablesOfAuthorities.MarkCitation _ Range:=Selection.Range,

Parse colors used in Word document, use as backcolor for ListViewItem - wrong color

怎甘沉沦 提交于 2021-01-29 05:02:25
问题 I'm trying to list all font colors used in a Word document, display them as colored ListViewItems. I can parse the doc and get all unique font colors. What does not work? - Getting the ListViewItems in the correct color. Grey35 appears as yellow, green as dark green. Here are my active code sections for that var maxnum = doc.Words.Count; var ind = 0; foreach (Word.Range wd in doc.Content.Words) { if (!string.IsNullOrEmpty(wd.Text.Trim('\r', '\n', ' '))) { ind++; bkwParseColors.ReportProgress

Parse colors used in Word document, use as backcolor for ListViewItem - wrong color

怎甘沉沦 提交于 2021-01-29 04:51:18
问题 I'm trying to list all font colors used in a Word document, display them as colored ListViewItems. I can parse the doc and get all unique font colors. What does not work? - Getting the ListViewItems in the correct color. Grey35 appears as yellow, green as dark green. Here are my active code sections for that var maxnum = doc.Words.Count; var ind = 0; foreach (Word.Range wd in doc.Content.Words) { if (!string.IsNullOrEmpty(wd.Text.Trim('\r', '\n', ' '))) { ind++; bkwParseColors.ReportProgress

Outlook email to pdf security prompt

谁都会走 提交于 2021-01-28 04:37:14
问题 I have a task which i need to create a program that converts outlook email to pdf. this is my code Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application(); NameSpace outlookNs = app.GetNamespace("MAPI"); MAPIFolder rootFolder = outlookNs.Stores["Blah"].GetRootFolder(); List<MailItem> mailItems = new List<MailItem>(); Folders subFolders = rootFolder.Folders; foreach (Folder folder in subFolders) { if (folder.Name == "Inbox") { Items items = folder

Office.Interop.Word - How to print the document on both sides?

跟風遠走 提交于 2021-01-27 05:33:11
问题 I print documents (batch print) using Word.Document.PrintOut method. How can I print a document on both sides? In the MS Word interface it can be done through the File -> Print -> Print on Both Sides option. Word 2010, C#, .NET 3.5 Many thanks to John for his answer (+1)! There are results of my research: I went to the first path that John recommends, found a few additional articles, like "classic" article on CodeProject (Changing printer settings using C#) and several others derived from it.

Could not load file or assembly ‘office, Version=15.0.0.0 using Microsoft.Office.Interop.Excel

我是研究僧i 提交于 2020-12-13 17:54:52
问题 I'm using Microsoft.Office.Interop.Excel to convert excel to pdf. But when I start Excel application, this error happened. I already installed Excel 2013 on my computer. (I'm using VS2019, Window 10). My Excel's location is at C\Program Files (x86)\Microsoft Office\Office 15\Excel . Could not load file or assembly ‘office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxx’. The system cannot find the file specified Any suggestions are welcomed! This is my code: using Microsoft