ms-office

How can Office Add-in (Task-pane) not display by default

☆樱花仙子☆ 提交于 2019-12-02 12:29:44
问题 I have an Task-pane Office Add-in (https://msdn.microsoft.com/en-us/library/office/fp123523.aspx) on registered Office 365 Site. When the user opens a spreadsheet from a document library on that site, then in edit mode, can use the "Office Add-ins" from the Insert menu to insert my add-in to the Spreadsheet. My add-in helps them population and update data on the spreadsheet. They then save the spreadsheet back with the updated data. Now, the next time they open that spreadsheet, my task-pane

Sharing VBA modules across MS Office Applications

会有一股神秘感。 提交于 2019-12-02 12:24:39
问题 I have a substantial bank of VBA modules written in an Excel 2010 add-in. Some of these are specific to Excel, but many are more general. For example one takes a part number and re-formats it; another contains a Case Select function to find a file in a network drive. I want to use the common functions in Word and Outlook. I could copy and paste from the Excel to Word add-ins, but this makes it difficult to keep my code up to date - when I make an edit in one application, I must remember to

Get number of pages for printing from Excel Interopb

我是研究僧i 提交于 2019-12-02 11:51:42
问题 How can I programatically retrieve the number of pages a workbook or worksheet will print to from the Excel 2007 Interop (Microsoft.Office.Interop.Excel)? 回答1: are you looking for ActiveSheet.PageSetup.Pages.Count ? 回答2: PageSetup.Pages.Count will give the correct answer. But how to fetch the correct count if comments are printed at end of sheet. 回答3: Just use "ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate:=True, IgnorePrintAreas:=False" Change "From" and "To" to

User-defined type not defined for AppointmentItem in Excel

房东的猫 提交于 2019-12-02 11:28:11
I copied example at http://support.microsoft.com/kb/220595 to the VBA in Excel. My code follows: Dim olApp As Outlook.Application Set olApp = CreateObject("Outlook.Application") Dim olAppt As Outlook.AppointmentItem Set olAppt = olApp.CreateItem(olAppointmentItem) I obtained the following error on the line Dim olAppt As Outlook.AppointmentItem : "User-defined type not defined". How should this be fixed? I use MS Office 2003. There are four prerequisite steps listed in that article. They are listed right before the code block. You probably forgot to follow the step two, Adding a reference to

Compiling builds that have Microsoft Excel in TFS

痴心易碎 提交于 2019-12-02 10:43:10
问题 I am trying to compile a project in VB.net 2010 that uses Microsoft Excel dll at some points. It works all fine when I compile from my computer, but when I use TFS to queue a new build, I get the error that Microsoft.Interop.Excel... are not defined. I installed Microsoft Office 2010 directly on the TFS server but I still get the same error. Are there any configuration I must perform for this to work? Edit: Typical error message you will see on a Build: Error BC30002: Type 'Excel.Worksheet'

Are the command codes for ExecuteMso documented?

烂漫一生 提交于 2019-12-02 10:29:25
问题 MS Office apps have an incredible API that lets one execute any command that is accessible from the UI, but inaccessible from the Object Model. Specifically, you can use ExecuteMso() to execute any command button, toggle button or split button. The docs say: expression.GetEnabledMso(idMso) idMso - Identifier for the control (String) Are the string command codes documented anywhere? Office apps have thousands of unique commands that can be viewed in the Options dialog, and it would be nice to

Batch file check office architecture version

ⅰ亾dé卋堺 提交于 2019-12-02 08:41:21
问题 i have the following script, that will print the current version of office and the architecture of the OS, Echo off&SetLocal Set "KEY="&Set "GUID="&Set "IOV="&Set "MWB=32"&Set "MOB=32" Echo=%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%|Find "64">Nul&&( Set "KEY=\Wow6432Node"&Set "MWB=64") Set "KEY=HKLM\Software%KEY%\Microsoft\Windows\CurrentVersion\Uninstall" For /f "Delims=" %%a In ('Reg Query %KEY% /k /f "*-001B-*0FF1CE}"') Do ( If Not Defined GUID Set "GUID=%%~nxa") If Not Defined GUID

All-in-one add-in for outlook

孤街醉人 提交于 2019-12-02 08:35:13
问题 I want to develop all-in-one add-in for Outlook. This means that this add-in will be available for all Outlook clients (desktop, web). I read here that i can do this. I already created add-in for Outlook Web Application and tried to deploy it to desktop client, but didn't figure how to make it. So how to make it set on desktop and outlook.com? Is that really possible? And if yes, how it can be done? 回答1: Technically you can't make an add-in that will work 100% on all clients. The web-based

VBA Extensibility in Outlook

半世苍凉 提交于 2019-12-02 08:11:43
I'd like to write a macro for Outlook 2007 that can add/remove modules in the VBA editor. The VBA Extensibility library looks perfect, but properties like Application.VBE seem to be inaccessible. In Excel, I would need to enable "Trust access to the VBA project object model" . Unfortunately, this option is missing in Outlook 2007. Does anyone know of a way around this? Thanks in advance! I worked around the limitations using SendKeys : Alt-F11 Ctrl-M Path to code module Enter Not elegant, but good enough. 来源: https://stackoverflow.com/questions/11355245/vba-extensibility-in-outlook

Let the button open a new window

北战南征 提交于 2019-12-02 08:00:22
I want to add a button under the tab of my add-in, and clicking on the button should open a URL in a new window or Dialog box. I tried the follows: <Group id="Contoso.Tab1.Group2"> <Label resid="Contoso.Tab1.GroupLabel" /> <Icon> <bt:Image size="16" resid="Contoso.TaskpaneButton3.Icon" /> <bt:Image size="32" resid="Contoso.TaskpaneButton3.Icon" /> <bt:Image size="80" resid="Contoso.TaskpaneButton3.Icon" /> </Icon> <Control xsi:type="Button" id="Contoso.TaskpaneButton3"> <Label resid="Contoso.TaskpaneButton3.Label" /> <Supertip> <Title resid="Contoso.TaskpaneButton3.Label" /> <Description resid