ms-office

Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE) Workarounds

萝らか妹 提交于 2019-12-01 02:34:41
From the following call Marshal.GetActiveObject("Excel.Application") I get a Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE)) I believe that this error is caused when the user permissions between my application and excel do not match. I want to know if there is a workaround as to how I can access the opened excel application regardless of how excel is opened, I can open the program that I want to access excell from as an administrator. Also I would like to know how I can tell what permissions processes were opened with? I have been using ProcessExplorer to look at

Is there functionality that is NOT exposed in the OpenXML SDK v2?

旧巷老猫 提交于 2019-12-01 02:19:32
问题 I want to know if there is anything that you cannot do with SDK that was exposed in the COM interface? 回答1: The OpenXML SDK is a convenience layer for the OpenXML file format. Using this SDK you can do everything that is possible to do with the file format, e.g. insert, modify and remove content, metadata and formatting. In contrast to COM automation of Office you can't do anything that is related to application logic. To give you some examples: Using the OpenXML SDK, you can't know the page

Different First Page in a document using microsoft office interop word in c#

回眸只為那壹抹淺笑 提交于 2019-12-01 01:48:25
How can i create a different first page header and footer in a document using Microsoft.office.interop.word. I have tried the following code but only in the first page, header and footer is coming. I want it in the other way(first page shouldn't have header and footer). can any one Please help me ? i tried a lot. Microsoft.Office.Interop.Word.Application w = new icrosoft.Office.Interop.Word.Application(); Microsoft.Office.Interop.Word.Document doc; w.ActiveDocument.PageSetup.DifferentFirstPageHeaderFooter = -1; doc.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageHeader; doc

Set CustomProperties on appointment for all attendees

浪子不回头ぞ 提交于 2019-12-01 01:45:18
问题 tl;dr When setting CustomProperties to an appointment that has attendees, only the appointment for the organizer gets the CustomProperties . The properties do not propagate to the appointments of the other attendees. Longer version When we create an appointment with multiple attendees and then log in as each attendee, we notice that each ItemId is different. So, it appears that each attendee in a meeting gets their own copy of an appointment. (Would really like someone to confirm this is true

APIs for monitoring Office 365

一笑奈何 提交于 2019-12-01 01:33:22
We need to integrate Office 365 with an existing system. For this, we will need to use Office 365 APIs to fetch important resources from Office 365, fetch/download logs for monitoring events, Audit Policy monitoring programmatically. Does Office 365 provide APIs for security policy monitoring Does it provide for APIs for maintaining and downloading logs I don't believe that there are APIs that will capture all of what you want to do. In case you haven't already, you should see if the Office 365 Reporting web service provides any of the information you need. Otherwise, I think you'd need to use

Office add-in with both taskpane and content?

随声附和 提交于 2019-12-01 01:14:46
I spent all night looking this up and can't find it. Is it possible to have an Excel/Office add-in that has both content and taskpane components? Really, I want a content app, but I want extra options/buttons in the ribbon and taskpane that will trigger different actions/changes in my content app. Whenever I try to add the VersionOverrides xml node to my manifest on a content app, it always fails. None of my buttons show up. All the examples I can find that work have the namespace [...]/taskpaneappversionoverrides . I've tried changing it to [...]/contentappversionoverrides but that doesn't

Strip Chinese Characters from a string (vba)

喜你入骨 提交于 2019-12-01 01:12:20
I am using Microsoft Project VBA to translate my activity names from English to Chinese. My problem is I have some Chinese translations embedded in some of the English activity names. I want to strip out the Chinese characters before passing the string to Microsoft Translator. Any ideas as to how I can do that? You can use a Regexp to strip the Chinese unicode characters Wikipedia lists the relevant characters below Sub Test() Dim myString as String myString = "This is my string with a " & ChrW$(&H6C49) & " in it." Dim objRegex As Object Set objRegex = CreateObject("vbscript.regexp") With

Launching WPF windows from an Office add in

≡放荡痞女 提交于 2019-12-01 00:29:02
问题 I have created an office add-in that holds an instance of a WPF Application. When the user clicks buttons on the add-in, I launch different windows by doing the following: MyViewModel viewModel = new MyViewModel(string infoFromOffice); MyWindow view = new MyWindow(); view.DataContext = viewModel; wpfApp.Run(view); In constructing view models before my call to wpfApp.Run() I hit probelms with the current SynchronizationContext later on. The answer here explains why. Is there a better way of

How to call VSTO class from other c# project

风流意气都作罢 提交于 2019-12-01 00:26:28
In my solution I have 2 projects. One is the controller, which in the final product is used to check if a execution is issued from console/non user input and therefore will execute the wanted changes in background based on imput from a xml-file, or if the execution was issued by user input, which will open an interface. A non user input would maybe a planed task or something like that, but thats is for an other time now and I just write that for some context. In both cases, sooner or later there is the need to access word-documents and read, write and change document-properties. To do that I

Read word document in C#

ぃ、小莉子 提交于 2019-12-01 00:19:44
I want to read a word document in the server (both doc and docx). The server does not have office installed, therefore i can't use com objects and also no commercial softwares. Is there a way that I can use office tools alone and read the word docs (2003 and 2007) Unfortunately there are no good free options for reading .doc and .docx files. Even commercial options are sparse at reasonable prices, but there are good extremely expensive options. For reading .doc files the only free option I'm aware of is POI for Java which you can run in .NET using IKVM. However, Word support in an experimental