Questions tagged [office-automation]

Use this tag for questions related to automating MS Office Products ( Excel, Outlook, PowerPoint, Access, Word, Project, etc. ). Automation in this context means the use of an external software, not an MS Office product, to execute a variety of operations on MS Office products. For questions about macros use the relevant tags for example "excel" and "vba". Do not use this tag if your question is not about automatic control.

Automation in this context means the use of computer systems to execute a variety of operations such as word processing, spreadsheet calculation, database manipulation, etc. without user interruption.

If you have a specific programming question about Excel or Word (or any other product from the MS Office package) and it is not about automating it via external software then use tags like , , , etc.

805 questions
2
votes
2 answers

Microsoft Excel Interop Check whether excel sheet support Autofit

While working with Excel Interop, i come up with an issue. Before Saving I Autofit columns of worksheet with the following code. Excel.Worksheet curSheet = (Excel.Worksheet)wsEnumerator.Current; curSheet.UsedRange.EntireColumn.AutoFit(); And it…
Mirza Bilal
  • 891
  • 11
  • 34
2
votes
1 answer

How to set default print 'zoom > scale to paper size' to be A4 from c# code?

I'm using the following code to create a word document from my c# application: oWord = new Word.Application(); oDoc = oWord.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing); oDoc.PageSetup.PaperSize =…
Themos
  • 430
  • 1
  • 9
  • 18
2
votes
1 answer

IE 9 not accepting SendKeys

I posted on IE 9 not accepting SendKeys to download a file, but this problem is separate enough from the answer I received to justify another question. My problem is that I can't get IE 9 to accept any of the SendKeys. I have attempted Page Down,…
derigible
  • 964
  • 5
  • 15
  • 32
2
votes
2 answers

OLE automation - WORD tabels (Delphi)

I'm trying to make tables inside tables in WORD. of course in finall program it will be dinamical, which is not in this sample. Here is my sample code. var aTable, bTable, cTable : OLEVariant; begin m_WordApplication :=…
Rok
  • 23
  • 2
  • 4
2
votes
2 answers

Programmatically encrypt Outlook email using Inspector

I'm using C# with Outlook Object Model (Redemption is not an option for me due to licensing) and I'm having difficulty programmatically encrypting an email message before sending it. I can successfully get a reference to the CommandBarButton which…
2
votes
1 answer

Can Visio's macro warning prompt be suppressed when automating in code?

I'm automating Visio 2003 from a VB.NET app. My code looks like this (with the uninteresting stuff removed): Dim objApp As New Microsoft.Office.Interop.Visio.InvisibleApp objApp.Settings.ShowFileOpenWarnings = False Dim objDoc As…
Steve Hiner
  • 2,523
  • 3
  • 24
  • 33
2
votes
3 answers

Error "This command is not available because no document is open" on Server

I use this code to send data to a Word Template and send to client. protected void Button1_Click(object sender, EventArgs e) { object missing = System.Reflection.Missing.Value; Microsoft.Office.Interop.Word.Application…
AmirHossein
  • 367
  • 1
  • 8
  • 25
1
vote
1 answer

How can change start up in Office 2010 Automation C# Application

I'm trying to create new Office excel workbook application how can i change start-up of this application to start with windows form instead of opening excel. Thanks
Moataz Aahmed Mohammed
  • 1,307
  • 5
  • 22
  • 33
1
vote
1 answer

automate word for windows 2007 from javascript

I have a Web application which invokes Word for Windows in order to perform spell checking on text taken from a Web form. The code uses the ActiveXObject call to create an instance of Word and makes use of the "HTMLProject" property to create a…
RlCHARD
  • 11
  • 3
1
vote
2 answers

Interop Issue on for DCOM in word automation

I am using a word automation class on an aspx page to open and edit a word file. The problem is that every time the code hits the open application line, i get the following error: Retrieving the COM class factory for component with CLSID…
John Baum
  • 3,183
  • 11
  • 42
  • 90
1
vote
2 answers

Using Microsoft Interop to read and write into excel cell

I have a excel file on web server where my website deployed. The scenario, I have a screen which allow user to download an Excel file from web server and save to local drive then select the same file path to export the data, but I'm getting the…
SeeSharp
  • 179
  • 1
  • 4
  • 12
1
vote
2 answers

Editing an Excel document with Macros in ASP.net

Is it possible in any way to edit an excel sheet through an ASP.net page that contains macro. I have tried to open the Excel sheet and it seems to just hang rather than load the excel. Testing on a page without macros works perfectly fine?
karlstackoverflow
  • 3,298
  • 6
  • 30
  • 41
1
vote
9 answers

The pros and cons of "Shadow IT" in software development

Recently we’ve seen the emergence of so-called “Shadow IT” within many organisations. If you’re not already familiar with the term, it refers to those who manage to dodge the usual IT governance by means such as using thumb drives to share files or…
1
vote
1 answer

Delete extra redundant Images when using a code to reply to an email with the original attachments

As you know while you are using outlook and reply to an email message, the original attachments is not included on the replied message. So, I have used the below code and it works correctly, except it adds sometimes extra redundant Images to the…
Waleed
  • 847
  • 1
  • 4
  • 18
1
vote
2 answers

Send Outlook email with attached Excel that opens at a specific tab for recipient

Hope you are well. I have a VBA code to generate an email and attached the Excel workbook on Outlook. Works fine. The button is on 1 tab and I want to ensure when the recipient opens workbook, it's to another specific tab. ie the button to…
Sonny
  • 21
  • 4