office-2010

Is it possible to prevent MS Access from changing the selected ribbon tab automatically when using a custom ribbon?

天大地大妈咪最大 提交于 2019-12-04 05:51:38
When a custom UI XML file is used to add several custom ribbon tabs in Access, the selected ribbon tab changes back to the first custom tab whenever a form is closed. We load a custom ribbon programatically from VBA. I've create an accdb that reproduces the problem . The folder also includes an XML file that contains the ribbon definition. It must be in the same directory as the .accdb file. The problem can easily be demonstrated: open the database RibbonTest.accdb, switch to Tab2 and open Form2 using the button on the ribbon and close Form2. Notice that Tab1 is now active. Of course, in this

Print certain pages only

心不动则不痛 提交于 2019-12-01 21:26:45
SOLUTION: Application.PrintOut FileName:="", Copies:=2, Range:=wdPrintRangeOfPages, Pages:="2,6-10" ORIGINAL QUESTION: I have the following code which works fine: Application.PrintOut FileName:="", Copies:=2 This prints my 10 page document twice. I now want to use the pages option to specify only certain pages to print out: Application.PrintOut FileName:="", Copies:=2, Pages:="2, 6-10" I was expecting it to print out pages 2 and 6 to 10 twice, i.e. 2,6,7,8,9,10,2,6,7,8,9,10, but instead it just printed all 10 pages twice. I am using VBA in Word 2010. Any idea what I'm doing wrong? RESOURCES:

Excel Addin that works on Excel 2007 and 2010

安稳与你 提交于 2019-12-01 19:26:06
I'm writing an Excel Addin that should work in both 2007 and 2010. When I create a new project with Visual Studio I need to decide which version I want. I've chosen 2007 before, but since I have 2010 installed I can't debug it. I get an error: You cannot debug or run this project, because the required version of the Microsft Office application is not installed. It is my understanding that if I target 2007 I should be able to run it on both 2007 and 2010. Is that correct? If that's so, can I debug it using 2010? A shared Add-in is made from a Visual Studio project creating a Com Add-In

How to display record data in a table in MS Access Form

醉酒当歌 提交于 2019-12-01 10:41:09
I am working in Offiice Access on a form. I notice that there are not a lot of controls available to use but I have a requirement to display data in a table like structure(not listbox or combobox). How can I accomplish this please? Actually, one of the truly great features in Access is what we call a continues form. A continues form is simply a form in which you can place any kind of control you want, the magic trick part is those controls will repeat over and over for you for each row of detail - the result is a grid, and I dare say one of the most powerfull grid controls avaialble - it is

How to display record data in a table in MS Access Form

余生颓废 提交于 2019-12-01 09:24:00
问题 I am working in Offiice Access on a form. I notice that there are not a lot of controls available to use but I have a requirement to display data in a table like structure(not listbox or combobox). How can I accomplish this please? 回答1: Actually, one of the truly great features in Access is what we call a continues form. A continues form is simply a form in which you can place any kind of control you want, the magic trick part is those controls will repeat over and over for you for each row

If I write an add-in for office 2007 will it work for 2010, 2013?

女生的网名这么多〃 提交于 2019-11-30 22:29:41
问题 I am currently in the process of re-writing some VBA macros that were written for office 2003. I was wondering if I wrote a C# add-in for 2007, if it would work for 2010 or maybe even 2013. Or if I wrote them for 2010 if they would work for 2007 and 2013 as well. I currently have access to 2007 but I could get access to 2010 if need be, no 2013 yet. So, basically, how much does the version of office affect the plugins? 回答1: If you use Visual Studio Tools for Office 2010 (VSTO 4.0) then it

Get a CheckBox in Word using OpenXML

荒凉一梦 提交于 2019-11-30 09:24:55
How does one get a handle to a CheckBox control that's embedded in a Word document using OpenXML? You would think that either Paragraph.ControlPropertiesPart or Paragraph.Descendents() would achieve something but in every single case I get a null type returned. I can traverse down the document tree using the actual XML structure, but this seems cumbersome. Suggestions welcome. The code below shows how to enumerate all checkboxes in a word document by using the Decendants<CheckBox>() method on the docuement's body. using (WordprocessingDocument doc = WordprocessingDocument.Open("c:\\temp\

Office 2010 server side automation in a Windows HPC Server 2008 R2 Environment

雨燕双飞 提交于 2019-11-28 12:50:14
I am aware of of the infamous Considerations for server-side Automation of Office from Microsoft and it clearly lists products from the 2010 suite. However, today I was made to believe by an IT ops techie that Office 2010 does not suffer from the issues mentioned in that article and can be used without issues within a server environment. I have been unable to find any reference or supporting doc that would substantiate the claim. (I will follow up with him on this, however he must have been referring to some other server side technique) My gut tells me he was smoking his socks! Is there an

Set custom document properties with Word interop

亡梦爱人 提交于 2019-11-28 11:26:55
I want to set some custom document properties of a word document I'm creating in my C# code. To do this, I followed this MSDN article and came up with this code: using Word = Microsoft.Office.Interop.Word; // Version 12.0.0.0 word = new Word.Application(); word.Visible = false; Word._Document doc = word.Documents.Add(ref missing, ref missing, ref missing, ref missing); logger.Info("Setting document properties"); Core.DocumentProperties properties = (Core.DocumentProperties)doc.BuiltInDocumentProperties; properties["Codice_documento"].Value = args[3]; properties["Versione_documento"].Value =

c# word interop find and replace everything

房东的猫 提交于 2019-11-28 07:02:49
I have some code to replace text inside a word 2010 docx. object fileName = Path.Combine(System.Windows.Forms.Application.StartupPath, "document.docx"); Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application { Visible = true }; Microsoft.Office.Interop.Word.Document aDoc = wordApp.Documents.Open(ref fileName, ReadOnly: false, Visible: true); aDoc.Activate(); Microsoft.Office.Interop.Word.Find fnd = wordApp.ActiveWindow.Selection.Find; fnd.ClearFormatting(); fnd.Replacement.ClearFormatting(); fnd.Forward = true; fnd.Wrap = Microsoft.Office.Interop.Word