ms-office

Creating a (ClickOnce) setup for VSTO Outlook Add-in

有些话、适合烂在心里 提交于 2019-12-06 03:29:39
问题 So I created an Outlook Add-in and used the click-once setup to deploy it. The setup runs fine when the user is administrator, but otherwise: no go. Running the setup with "run as..." and logging in as admin works, but than the add-in is installed under the admin, not the current user. The addin doesn't show up in outlook. I tried following this guide: http://blogs.msdn.com/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspx But I get stuck at part I: http://blogs

VSTO 2012: backward compatibility

大兔子大兔子 提交于 2019-12-06 03:23:55
Since lately the Visual Studio Tools For Office 2012 (VSTO 2012) are available for download . Can this new version still used for developing Add-In solutions for older Office versions (2007,2010)? Are there any advantages over VSTO 4.0 (besides Office 2013 support) Yes, it can. I'm using VS2012 for an Excel 2007 project and it works fine. The trick is to change the debug path in your project file so that VS uses the older version of the Office app your plugin is for. Create your VSTO project (let VS create the project for Office 2010) Edit the project file and find the <ProjectProperties> with

Counting emails in outlook by date

柔情痞子 提交于 2019-12-06 03:09:55
问题 I Have the following code to count the number of emails in a outlook folder. Sub HowManyEmails() Dim objOutlook As Object, objnSpace As Object, objFolder As Object Dim EmailCount As Integer Set objOutlook = CreateObject("Outlook.Application") Set objnSpace = objOutlook.GetNamespace("MAPI") On Error Resume Next Set objFolder = objnSpace.Folders("Personal Folders").Folders("Inbox").Folders("report's").Folders("Customer") If Err.Number <> 0 Then Err.Clear MsgBox "No such folder." Exit Sub End If

How can I start MS Office Word from .NET without Add-ins?

怎甘沉沦 提交于 2019-12-06 02:46:33
问题 I'm using MS Office 2003 PIA to create a MS Word document from c#. ApplicationClass officeApplication = new ApplicationClass(); Is there any way to specify that I don't want any office add-ins to be loaded using this method? EDIT: I know that one can do this via command line so I'm pretty sure there must be a way to do it from code: "C:\Program Files\Microsoft Office\Office11\Winword.exe" /a 回答1: This code unload the AddIns officeApplication.AddIns.Unload(false); Edited: When you need to mix

Open an Excel file and save as .XLS

人盡茶涼 提交于 2019-12-06 02:44:27
问题 I have the following code, I want it to open my files which are saved as .xlsx and simply save them again with the same filename but this time as a .xls file so that they are compatible with Excel 2003 Set app = CreateObject("Excel.Application") Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("Y:\Billing_Common\autoemail").Files If LCase(fso.GetExtensionName(f)) = "xlsx" Then Set wb = app.Workbooks.Open(f.Path) app.DisplayAlerts = False wb.SaveAs "*.xls*" wb

C# COM Office Automation - RPC_E_SYS_CALL_FAILED

醉酒当歌 提交于 2019-12-06 02:37:01
问题 I'm writing a C# program that acts as a PowerPoint 2007 plugin. On some machines, some calls to the PowerPoint object model throw a COMException with the message RPC_E_SYS_CALL_FAILED . I couldn't find any specific advice on what to do regarding this error, or how to avoid it. From Googling it looks like something to do with the message queue or Single-Threaded Apartments. Or am I way off? Example of the error message is: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL

MS Office PIAs “backward compatibility”

寵の児 提交于 2019-12-06 02:01:13
问题 I've successfully completed a Windows Forms application with MS Word integration - the application writes to mergefields in a Word Template. I did the template using MS Word 2007, but saved it in compatible mode as a 97-2003 '.dot' file. Due to the fact that I have Office 2007 installed, I'm using version 12.0 of the MS Word Object Library PIA. If I were to deploy this application, would another person using Office XP or 2003 be able to use it, hence my asking about compatibility? I have

Developing MS Word add-in

社会主义新天地 提交于 2019-12-06 01:51:41
问题 Anyone knows of a good tool for developing add-ins for Word in .net? Hopefully something that supports both office 2003 and 2007. Thanks. 回答1: There are lots of options for development tools for Office. The most obvious one is of course Office itself. It has rich support for macros and VBA. You could also use SharePoint to extend document sharing and management functionality. But if your add-in is more complex than can be handled inside of Office, I suggest you use Visual Studio 2008 or the

reading word file in c#

℡╲_俬逩灬. 提交于 2019-12-06 01:48:18
问题 I have a word document I want to parse with C#. There are plenty of tutorials out there, but I have a hard time deciding what library to use. I found the following dlls: Microsoft.Office.Interop.Word Microsoft.Office.Tools.Word Microsoft.Office.Tools.Word.v4.0.Utilities COM Microsoft Word 12.0 Object Library Open XML sdk These are all I found on the web. Which one should I use? Which of those are obsolete? 回答1: You can also do it using NetOffice Site: http://netoffice.codeplex.com/ Using it

How to automate Microsoft word 2003 from WPF?

こ雲淡風輕ζ 提交于 2019-12-06 01:24:31
I have a WPF window( using c# as code behind) that has some text fields. What I want is, when the user presses the print button I want to take the information on these fields and use Microsoft word 2003 template. The template has some blank fields to be filled with these info coming from WPF widow. How would I automate word to do this? This is easy: Add a COM reference to the the "Microsoft Word 11.0 Object Library" (or use the Microsoft.Office.Interop.Word assembly). You may have to in install Visual Studio Tools for Office System and/or browse to your the Primary Interop Assembly, depending