ms-office

Access 2007 file picker, replaces all rows with the same choice

我与影子孤独终老i 提交于 2019-12-06 14:57:08
This code is from an Access 2007 project I've been struggling with. The actual mean part is the part where I should put something like "update only current form" DoCmd.RunSQL "Update Korut Set [PikkuKuva]=('" & varFile & "') ;" Could someone please help me with this?` If I use it now, it updates all the tables with the same file picked. Heres the whole code. ' This requires a reference to the Microsoft Office 11.0 Object Library. Dim fDialog As Office.FileDialog Dim varFile As Variant Dim filePath As String ' Set up the File dialog box. Set fDialog = Application.FileDialog

how to export dataset to excel in c# console application using Microsoft.Office.Interop dll

烂漫一生 提交于 2019-12-06 14:52:49
问题 How do I export data from my C# console application to Excel using Microsoft.Office.Interop dll? 回答1: Add a using statement like this: using Excel = Microsoft.Office.Interop.Excel; Then define a variable that will enable you to work with Excel documents and workbooks: Excel.Application xlApp = new Excel.Application(); Create a function that will write from your DataSet into an Excel document (This is from one of my Windows applications button_click function, but I think you will be able to

How can I load another new Word document in the same Word window?

狂风中的少年 提交于 2019-12-06 14:41:15
问题 It seems that in the Microsoft Word object model, a Word document is bound to a Window, but I want to close the existing document and open a new one without closing the Word window. How can I do this? 回答1: This works for me to close a document and open a document in the same window (I'm running the macro from normal.dotm ): Sub CloseOpenSameWindow() Dim d As Document: Set d = ActiveDocument Application.ScreenUpdating = False d.Close Application.Documents.Add Template:="C:\Users\Me\Desktop

Excel VBA Workbook.ChangeFileAccess

本秂侑毒 提交于 2019-12-06 13:50:05
I'm having trouble with changing the file access mode on Excel workbooks using VBA. I am using Office 2010. I want to be able to alternate between read only and read write mode as appropriate. However it seems changing a workbook from read/write to read only and then back again as in the code below causes an automation error when trying to access any member of the workbook object. Public Sub example() Dim w As Workbook 'open workbook with write access Set w = Workbooks.Open("example.xlsx", ReadOnly:=False) Debug.Print w.Name 'sucessfully accesses members of w 'change file access to read only w

An automated way to load multiple images into PowerPoint on different pages?

给你一囗甜甜゛ 提交于 2019-12-06 13:15:48
I need to load about 60 images, each on a different page, in to PowerPoint. Does anyone know of an "automated" way to do this. I don't want to go through slide by slide, and have to click "load image" on each one. If it was a one-time thing, I wouldn't worry about it, but we're summarizing results from some analysis that is ongoing and we'll have to do it many times. Thanks. edit: After brief discussion with co-worker, it seems that "insert -> photo album" does this easily. From PPTools : Insert -> Photo Album works well in PPT 2007. There are a few Problems in older Versions, because the

Why a file starting with ~$ is created when opening a word document?

眉间皱痕 提交于 2019-12-06 11:54:26
We all might have noticed the creation of a file named "~$filename.docx" (hidden) when opening filename.docx using MS Word What is the purpose of this file? Why is it created and what does it contain? It maintains temporary information about the current state of the document. Have you ever encountered a crash and when you open Word it asks you to recover certain documents that were being edited? That's where it gets that information. 来源: https://stackoverflow.com/questions/28950333/why-a-file-starting-with-is-created-when-opening-a-word-document

How to show an Office/Word 2013 Task Pane 'Office App' after a click on a button in Ribbon?

自作多情 提交于 2019-12-06 11:48:46
I've created a Task Pane App with the new Office App model. It uses JQuery and a REST Service to search and display data from SharePoint in the (Word 2013) Task Pane. This works ok, however the App Task Pane should be activated after clicking on a custom button in the ribbon. To create the button, I've created a Word 2013 Addin project with following Custom UI XML: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load"> <ribbon> <tabs> <tab idMso="TabHome"> <group id="ContentGroup" label="SharePoint App"> <button id="spAppButton" label="SharePoint App"

Converting xlsx to xls using Microsoft Office Compitablity Pack's excelcnv

浪尽此生 提交于 2019-12-06 11:34:45
问题 The internet says that you can convert xlsx files to xls files using Microsoft Office Compitablity like this: "C:\Program Files\Microsoft Office\Office14\excelcnv" -nme -oice D:\test\new.xlsx D:\test\old.xls However, this works backwards - it converts xls files to xlsx files. Does anyone know the excelcnv switches to convert xlsx to xls? 回答1: For me, using the compatibility (conversion) pack for Office 2003, simply switching the places of the parameters in the example you cite works; e.g. if

We couldn't connect to the catalog server for this add-n

◇◆丶佛笑我妖孽 提交于 2019-12-06 11:27:51
I just realized that many add-ins cannot be loaded in Excel Online (Chrome): Does anyone know what's happening? This is a known issue reported through StackOverflow and other channels. We're investigating this as a high priority issue. We'll let you know when the issue is resolved. 来源: https://stackoverflow.com/questions/46670563/we-couldnt-connect-to-the-catalog-server-for-this-add-n

How can I print Office documents from .NET in a uniform manner?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 11:06:37
Using Microsoft interOp objects, I can programmatically print a Word or Excel document. Is there any simpler and uniform way to programmatically print all types of documents (.txt, .doc, .xls, .pdf etc.)? Microsoft uses DDE by default to print from office products. Go to Tools/Folder Options/File Types, then lookup .XLS for example and click 'Advanced'. You will see a list of actions, one of which is 'Print'. Inside this is the DDE command that Excel uses to print then close your document, and one of these commands exists for each product in the Office suite. Unfortunately DDE uses the