office-interop

How can I get special Unicode characters to appear when Pasting the Clipboard into an Outlook Email?

試著忘記壹切 提交于 2019-12-24 07:07:22
问题 I am able to successfully embed HTML text by copying to the Clipboard (thanks to Mike Stall's .NET Debugging Blog) and paste into the body of an Outlook email message. However, "special" Unicode characters are not getting pasted in properly using the Word.Selection's PasteAndFormat(), PasteSpecial(), or Past() methods. Everything works perfectly unless I have text like this: "Ôh my gôd". Before the Paste() operation, I can get the clipboard text and see that the correct text has been put into

How to copy contents of Excel UsedRange into an array for faster reading?

百般思念 提交于 2019-12-24 06:31:04
问题 I'm trying to improve the performance of an application that is reading cells from an Excel worksheet row by row. I found this solution https://stackoverflow.com/a/25842904/1462656 You want to do it in one operation: object[,] objectArray = cSheet.get_Range("A1:C4").Value2; dataRange.Value2 = objectArray; Is it assuming all the cells are of type Value2?. In general I would like to know how to get the contents of the UsedRange into a local array for faster access (instead of keep going back

How to copy contents of Excel UsedRange into an array for faster reading?

笑着哭i 提交于 2019-12-24 06:29:48
问题 I'm trying to improve the performance of an application that is reading cells from an Excel worksheet row by row. I found this solution https://stackoverflow.com/a/25842904/1462656 You want to do it in one operation: object[,] objectArray = cSheet.get_Range("A1:C4").Value2; dataRange.Value2 = objectArray; Is it assuming all the cells are of type Value2?. In general I would like to know how to get the contents of the UsedRange into a local array for faster access (instead of keep going back

Defeating 'A program is trying to access email' with SendMessage

♀尐吖头ヾ 提交于 2019-12-24 06:05:43
问题 I am writing an application in C# that uses Office Outlook Interop (2010; version 14) to access email data through MAPI. So far I have to manually and repeatedly click Allow in Outlook's " A program is trying to access email address information stored in Outlook " security popup (screenshot at http://i.stack.imgur.com/gj8to.png). I tried to write a method to do the clicking automatically, but unsuccessfully. The clicking takes place, but Outlook Interop throws the following exception during

PowerPoint Open “Record Slide Show” Dialog and detect if Presentation has a recording c# addin

帅比萌擦擦* 提交于 2019-12-24 03:07:40
问题 I am developing a PowerPoint AddIn and have been asked to add a reminder to the user to "Record Slide Show". Can anyone help me find out how to programmatically open the "Record Slide Show" dialog box and also how to detect if the user has already added a recording to the slide show please? Many thanks Trevor 回答1: Finally got this to work. In the ribbon I have added the following: public static void callRecordDialog() { Globals.ThisAddIn.Application.CommandBars.ExecuteMso("RecordNarration");

better method for accenting every word in Word document?

冷暖自知 提交于 2019-12-24 02:16:35
问题 I am new to programming, but I am trying to adapt an existing script as a MS Word 2010/2013 addin to add correct stress accentuation to every Latin word in an open document. The script "DoAccentuate" returns an accented word for any unaccented Latin word I send it as a string. I just need help doing a better job of looping through all the words, and then stopping the loop when the last word is reached. My current method is a bit goofy...I insert a nonesense word at the end of the document and

Interop.Word Documents.Open stuck

99封情书 提交于 2019-12-24 00:53:59
问题 I have same application on two different machine. On first machine all work fine, while in second machine I have a problem. Debugging code I can see that when Interop.Word Documents.Open is called then execution remains locked, and never go to next code line, while browser (IE7) stuck on loading. I need to open a word template, write in opened document, and then close it. So I do following : _Application wdApp = new Application(); wdApp.Documents.Open(templatePath); Why on first machine this

How to Debug an office 2007-addin with office 2010

落爺英雄遲暮 提交于 2019-12-23 13:34:09
问题 I want to develop a word addin that should run for word 2007 and word 2010. So I created a word 2007 addin project in visual studio. on my mashine there is (only) word 2010 installed. When I try to debug the addin from visual studio, I get the error message that this add in can only be debugged with word 2007. Is there a way to debug a office (word) 2007 addin with office (word) 2010? Thanks in advance Tobias 回答1: See http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/1c9f6338-e08c

Microsoft.Office.Interop.Excel Reference in Build Server [duplicate]

混江龙づ霸主 提交于 2019-12-23 13:08:44
问题 This question already has answers here : Is it necessary for the build machine to have Microsoft Office 2007 installed? (3 answers) Closed 4 years ago . I'm using Microsoft.Office.Interop.Excel reference in the windows service application to create excel reports. The application builds fine in DEV machine but in the build machine it fails saying "The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)". It's working in DEV

Assembly Microsoft.Office.Interop.Word, Version=15.0.0.0 uses Microsoft.Vbe.Interop, Version=15.0.0.0

♀尐吖头ヾ 提交于 2019-12-23 12:23:45
问题 I just downloaded MS Visual Studio 2010 solution and get that error. Error 1 Assembly 'Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' uses 'Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' which has a higher version than referenced assembly 'Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' c:\PROJECTS\UHelper\Assemblies\Microsoft.Office.Interop.Word.dll