ms-office

How do I get the scroll position from Microsoft Excel

北城以北 提交于 2019-12-08 10:45:22
问题 When using Microsoft office automation I want to insert images into a spreadsheet. How can I determine the current users scroll location? 回答1: In Excel you may use the VisibleRange property of the Window object, i.e. Private Sub DirtyTest() Dim MyW As Window, TopRow As Long, TopCol As Long Set MyW = Windows(1) ' index 1 always refers to the window displayed TopRow = MyW.VisibleRange.Cells.Row TopCol = MyW.VisibleRange.Cells.Column ' any other code End Sub Hope that helps Good luck MikeD 来源:

Customize “New” tab in Word backstage to add custom templates

我是研究僧i 提交于 2019-12-08 10:40:02
问题 I want customize Word's backstage to add custom templates in "New" tab and not another. Templates come from a web service. I use Office 2010. Application is develop in C# with Visual Studio 2010. Is it possible? 回答1: You can add custom templates to the New tab of Word's backstage view by providing an XML manifest, which describes the template and the location of a preview image. The detailed steps are described here: Deploy custom templates in the 2007 Office system Be aware though that this

Office JavaScript API: highlighting text in a document

删除回忆录丶 提交于 2019-12-08 10:36:36
问题 I'm working on a side project using the Microsoft Office JavaScript APIs. I have been relying on the documentation to find my way around, but I've hit a wall trying to find something in the docs (perhaps it isn't there because it doesn't exist). Recently I attempting to implement some functionality to highlight some text within a Word document. I don't want to modify the document, mind you; in other words I would rather not use something like ContentControl.insertHtml as that would change the

Using MODI to OCR in C#. Need to read images from memory, not disk

只谈情不闲聊 提交于 2019-12-08 09:35:01
问题 I'm trying to use MODI to perfom OCR on bitmaps I already have in memory. I can't seem to find a solution to this as all the examples I find use the create method to grab the image from the disk and prepares it for the OCR., however, I already have the image on memory and writing and reading i to and from the disk consumes too much time. Bitmap bmp = ... //Instantiate the MODI.Document object MODI.Document md = new MODI.Document(); //The Create method grabs the picture from disk snd prepares

Office 365 / EWS Authentication using OAuth: The audience claim value is invalid

百般思念 提交于 2019-12-08 08:36:57
问题 I'm still struggling with this. Please see my previous question for details. I am doing an application (currently command line) which should access Office 365/Exchange through EWS Managed API. The goal is to authenticate through OAuth2. I have registered an application in Azure AD. I have used the ClientID from there I generated an App Secret / Key I have delegated the "Have full access to a users' mailbox (preview)" permissions to the App. I am using ADAL to retrieve the Access Token like

Creating an Equation Editor 3.0 equation in a Word 2003 document using a marco (or through the API)

核能气质少年 提交于 2019-12-08 08:13:04
问题 I think the title is fully descriptive now. Anyway, I need to generate a word document from my delphi application. It needs to choose from one of four different equations (with some specific parameters for each document). So far I have manage to create the whole document programmatically except the equation. Is it possible to create equations programmatically? if so, where is de API documentation from MS? if not, which solution can be used? 回答1: Going the VBA route that Brian suggested will

Word Add-in Get full Document text?

我与影子孤独终老i 提交于 2019-12-08 07:31:14
问题 I'm writing an office-addin using the Yeoman Office generator, based on these instructions. The default add-in has a function which will get the text selected in your word document. I'm trying to modify the function to instead get the full-text of the document. My function code is as follows: function getDataFromDoc(){ Office.context.document.getFileAsync(Office.CoercionType.Text, function(result){ jQuery('#get-data-from-selection').click(getDataFromSelection); if (result.status === Office

C# free Doc 2 PDF solution

这一生的挚爱 提交于 2019-12-08 07:27:34
问题 would anyone suggest a free solution to programmatically convert Office documents (mostly .doc) to PDF in the form of a .NET library or a command-line application i can call from my program? Thanks PS : I know I can use SaveAs PDF in newer versions of Office, but some of the clients where the program will run still have older versions of Office. 回答1: Won't GhostScript (GhostScript Website) do that for you? Otherwise, I think, under reserves, that PDFSharp might do it. If these won't do, I

How can I set the picture associated with a node in a SmartArt graphic?

时光总嘲笑我的痴心妄想 提交于 2019-12-08 07:24:45
问题 SmartArt graphics can have pictures associated with the "nodes" (although this is only used by certain SmartArt templates). I know how to set the text of a node via VBA/VSTO automation, but I can't figure out how to set the picture. Can it be done? 回答1: Try something like this - if you've done any work in VBA with smartart this should make sense. Dim oSALayout As SmartArtLayout Dim QNode As SmartArtNode Dim oShp As Shape Set oSALayout = Application.SmartArtLayouts(91) 'reference to

COM typelibrary for Office 2010 IM integration

↘锁芯ラ 提交于 2019-12-08 07:04:33
问题 I am integrating Office applications with custom IM solution. I have implemented the COM class as suggested by http://msdn.microsoft.com/en-us/library/office/jj900715.aspx I have also registered the COM implementation and hosted the COM server in my exe. Do I also need to additionally register the typelibrary of my com class ? I am seeing issues with type library regsitration and lync client 2013. When I uninstall the type library, Lync Client breaks Generic COM Exception. Code is 0x80080005.