ms-office

Checking for the Variant value “Nothing”

こ雲淡風輕ζ 提交于 2019-12-01 04:27:52
This is something I ran into last year, and SO seems like a good place to document it :) Q: When automating Excel (/Word/...) from Delphi, how can I check if an Excel function returned the variant Nothing (as it's called in VBA)? Rob Kennedy The VarIsClear function includes your situation where the type is varDispatch and the value is nil . It also includes empty and "unknown" values, and custom variant types. I see it in my Delphi 2005 source; I don't know how much earlier it was included. onnodb Curiously, VBA's Nothing is not the same as Unassigned , Null or Empty , so you can't use, e.g.:

Set CustomProperties on appointment for all attendees

此生再无相见时 提交于 2019-12-01 04:20:28
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). However, when setting a custom property from our add-in (using the Outlook JavaScript API), only the

Launching WPF windows from an Office add in

女生的网名这么多〃 提交于 2019-12-01 04:14:48
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 launching WPF windows from an office add-in? Arthur Nunes I've never created an Office add-in, but I have

Event on “Item Sent” in Outlook

◇◆丶佛笑我妖孽 提交于 2019-12-01 04:10:39
I'm using ApplicationEvents_11_ItemSendEventHandler (see http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.applicationevents_11_itemsendeventhandler.aspx ) to do some processing when an item is sent from Outlook. However, as this event fires on "send", rather than "sent", I'm unable to obtain certain information, such as the sender, sent time etc. Is there an alternative event that fires after the item has actually sent? I've read this blog post; http://easyvsto.wordpress.com/2010/07/27/how-to-save-mail-content-when-a-mail-is-sent-from-outlook/ but I'm wary of depending

Formula to find the last “ \ ” in a filepath and remove all after that

て烟熏妆下的殇ゞ 提交于 2019-12-01 04:04:45
问题 So I have an excel task that involves taking filepaths (C:\foo...) and getting just the path (that is, removing the actual file name from the path). I can't seem to get the SEARCH/FIND function to work since it is always finding the first "\" in the file path (after the drive designation) and only removes 3 or so characters. Is there a formula that will allow me to trim after the last "\" in the filepath? Thanks in advance for any help! 回答1: First of all, your question would be better off on

SaveAs2 For Word 2010 not working with Client PC having Word 2007

微笑、不失礼 提交于 2019-12-01 03:48:47
问题 I have developed a WinForm Application with VB.Net (VS2010) having Office 2010 Professional Installed, and it is 64-bit Windows 7 Platform. The program opens a .doc and .rtf format document, and attempts to save it in htm format. I am using following commands: Dim sFilePath as String = "C:\ABC\file.doc" Dim oApp As New Microsoft.Office.Interop.Word.Application Dim oDoc As New Microsoft.Office.Interop.Word.Document Dim sTempFileName As String = System.IO.Path.GetTempFileName() oDoc = oApp

How to access columns in a table that have different cell widths from MS Word

本小妞迷上赌 提交于 2019-12-01 03:19:00
问题 I am trying to get the cells from 1st column in a table. Getting exception in the " Foreach(Cells c in rng.Tables[1].Columns[1].Cells) " because the table contains columns that have mixed cell widths. for eg: in first row, there are 4 cells and in second row, there are only 2 cells (2 cells merged together) Error Message: " Cannot access individual columns in this collection because the table has mixed cell widths. " Document oDoc = open word document foreach (Paragraph p in oDoc.Paragraphs)

Powerpoint: Manually set Slide Name

﹥>﹥吖頭↗ 提交于 2019-12-01 03:16:02
Context: A PowerPoint slide in C# has a property Slide.Name (usually contains an arbitrary string value). In my C# application I would like to use this property to identify slides (the slide order is to unreliable). Question: How can I manually set the Slide.Name property in the PowerPoint Application? My problem is very like to the: “ How to name an object within a PowerPoint slide? ” but just on the slide level. Any help would be appreciated. There is no built-in functionality in PowerPoint that allows you to edit the name of a slide. As Steve mentioned, you have to do it using VBA code. The

Do Office Add-ins always require Internet access to work?

非 Y 不嫁゛ 提交于 2019-12-01 02:59:21
问题 Let's take Excel for example. In Excel 2016, when I select an add-in in the STORE , after clicking on Trust It , will the code ( .html , .js files) of the add-in be downloaded or installed on my machine? In other words, have the add-ins under MY ADD-INS been already installed on my machine, such that i could load and run them without Internet (if an add-in does not send or receive special data to or from Internet)? I am asking this question, because i want to know if a basic add-in always

Checking for the Variant value “Nothing”

女生的网名这么多〃 提交于 2019-12-01 02:40:46
问题 This is something I ran into last year, and SO seems like a good place to document it :) Q: When automating Excel (/Word/...) from Delphi, how can I check if an Excel function returned the variant Nothing (as it's called in VBA)? 回答1: The VarIsClear function includes your situation where the type is varDispatch and the value is nil . It also includes empty and "unknown" values, and custom variant types. I see it in my Delphi 2005 source; I don't know how much earlier it was included. 回答2: