office-interop

Using interop.word ranges

假装没事ソ 提交于 2019-12-25 18:12:15
问题 I'm having trouble figuring out how to work with word ranges. I have picture files that I am adding to a word file, but I can't figure out how to add text and tables in between the pictures. The structure I want is this: Text, table, picture. Then repeat. However, when I add text or tables, they all area added after the four pictures, which stay at the top of the file. I've been reading and I've figured out I need to use ranges to specify where you want to place the tables/text, but all the

Using interop.word ranges

你说的曾经没有我的故事 提交于 2019-12-25 18:12:03
问题 I'm having trouble figuring out how to work with word ranges. I have picture files that I am adding to a word file, but I can't figure out how to add text and tables in between the pictures. The structure I want is this: Text, table, picture. Then repeat. However, when I add text or tables, they all area added after the four pictures, which stay at the top of the file. I've been reading and I've figured out I need to use ranges to specify where you want to place the tables/text, but all the

using Microsoft.Office.Interop.Word in Sharepoint environment

橙三吉。 提交于 2019-12-25 17:19:23
问题 You'll have to forgive my ignorance with regards to this code. I have written some code to modify an event receiver. I have set up a development environment for SharePoint and finally got it to access and change certain elements of the code. However, it is the following line where it fails: Word.Application wordApp = new Word.Application(); In that, it doesn't seem to be able to open the local word application installed on the Sharepoint server in order to process the uploaded document. Any

using Microsoft.Office.Interop.Word in Sharepoint environment

北城余情 提交于 2019-12-25 17:19:06
问题 You'll have to forgive my ignorance with regards to this code. I have written some code to modify an event receiver. I have set up a development environment for SharePoint and finally got it to access and change certain elements of the code. However, it is the following line where it fails: Word.Application wordApp = new Word.Application(); In that, it doesn't seem to be able to open the local word application installed on the Sharepoint server in order to process the uploaded document. Any

Error thrown when opening e-mails using outlook api

别等时光非礼了梦想. 提交于 2019-12-25 13:14:11
问题 Question: I get the following error message when opening what appear to be valid .MSG files using Outlook API to open emails: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook.MailItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063034-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E

Copy the contents of a DataGridView in to excel

元气小坏坏 提交于 2019-12-25 12:56:08
问题 I found some examples of how to create a excel file from a data grid view, however those just create the file. What I would like to do is have excel open, with a unsaved worksheet, and have the content of the data grid view (including header names) pasted in to the worksheet after pressing a "Export to Excel" button. Basically I want to automate what happens when you do a copy and paste from a data grid view in to excel. Any suggestions on how to do this? 回答1: Take a look at this tutorial,

interop Shapes.AddPicture creates incorrect dimension for image

五迷三道 提交于 2019-12-25 05:27:24
问题 I am using interop to create powerpoint presentation.i use Shapes.AddPicture to add images to slide. Shapes.AddPicture(strImagePath, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, Convert.ToInt32(shape.Left), Convert.ToInt32(shape.Top), Convert.ToInt32(xmlTempNode.Attributes["imgwidth"].Value), Convert.ToInt32(xmlTempNode.Attributes["imgheight"].Value));//load new image to shape i am passing imageheight as 127, however final slide contains image with

OneNote 2010 Add-In load problem

ⅰ亾dé卋堺 提交于 2019-12-25 04:33:39
问题 Googled out- could use some help here. I followed this excellent tutorial here (http://www.malteahrens.com/#/blog/howto-onenote-dev/) and have created my own onenote 2010 addin, but I am having trouble getting it to STAY in onenote. On first install of the addin, I open onenote and the addin is loaded just fine (registry shows load behavior 3). I close onenote and then simply open it again and my addin is unloaded. Onenote (options-addins-manage com addins) shows there was a load error with

OfficeJs/WordJs select text range by index and bind click event

醉酒当歌 提交于 2019-12-25 04:21:45
问题 First , Using OfficeJS/WordJS how can I select text in a paragraph by index and length. For example, my paragraph has 100 characters and I need to select all from index 2 till index 16. Second , When I found this range - how I can add an event handler for this range? I mean, when user click at 2-16 chars in my paragraph - I will show some useful information in my Add-in. I'm using Word 2016 Add-in. Thanks! 回答1: I recommend you to explore the Range functionalities we added as part of the 1.3

PowerPoint Shapes.AddOLEObject Throws Error HRESULT E_FAIL

末鹿安然 提交于 2019-12-25 03:22:03
问题 Following the guidelines from this link, I've wrapped a user control as an ActiveX component. Build the code successfully, and I can confirm that the COM component is registered in Windows registry. Class name mentioned in registry is "MyChartsControl.UserControl1". After that I try to add my ActiveX Wrapped user control in PowerPoint Slide object using following code: powerpointSlideObject.Shapes.AddOLEObject(100, 100, 111, 222, ClassName:="MeridiaChartsControl.UserControl1") OR using the