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
0
votes
1 answer

How to programmatically change background color in MS Project 2007 cell?

I am tring to automate some MS Project features using C# and cannot find a solution how to change background and font color of special task cell. I enumerate all tasks in project in that code sample, and when if statemet is true i want to change…
al072
  • 79
  • 2
  • 14
0
votes
1 answer

office automation null reference exception (only on some installations)

I've been using office automation for some time now, in order to merge data into a word document using the following code: oWord = new Microsoft.Office.Interop.Word.Application(); oWord.Visible = false; oDoc =…
Themos
  • 430
  • 1
  • 9
  • 18
0
votes
1 answer

MS Word COM addin can't receive messages in XP

From inside my COM addin I create a dialog, and I then send messages to it from an external process. I use HWND_BROADCAST and RegisterWindowMessage. But those messages are never received by the dialog proc of the COM addin. I know this because I log…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
0
votes
1 answer

Excel VBA Workbook not adding to Object Collection

I am trying to create a collection of workbooks that will allow me to more easily keep track of all the workbooks that are opened. Because the workbooks will be named differently each time, and because I need to make this work without assuming that…
derigible
  • 964
  • 5
  • 15
  • 32
0
votes
1 answer

Using Firemonkey to merge data with MS Word docs

I'm about to write a windows app that will merge database data with ms word docs. I would like to know whether I am able to do that with Firemonkey, so in the future I can reuse the non Windows-specific code in Mac. Am I able to use MS Office…
0
votes
1 answer

Delphi - Keeping Word Document Focused

I have run into an interesting problem with the current application I'm working on in Delphi. The problem is that in certain circumstances the ActiveDocument of our TWordApplication can be changed before the document is completed. I have a…
Dan Kelly
  • 2,634
  • 5
  • 41
  • 61
0
votes
1 answer

Using Word automation in C# I want to change the path which the next Save button will refer to

I have an application which creates and opens a document in Word. The user can modify the document and then save it again, but I don't want the user to be prompted via Word to save it in the location from which it was loaded - I want to set the…
Peter
  • 1,292
  • 4
  • 15
  • 33
0
votes
1 answer

Remove Control Control from Word document after generating a document

I have a C# document generation component which inserts content into control controls in a word document and everything is working well. The only problem is that in the generated document, the content controls are still there and you cannot select…
John Mc
  • 2,862
  • 1
  • 22
  • 37
0
votes
1 answer

range : apply formatting to a sub section in the range

I'm writing a piece of code in c# to generate a report in microsft word document. I have a table of wid 2 columns. I select the 2nd column by oMainTable.Cell(currentRowNumber, 2).Range Every time I have to write something in that cell I use the…
Prerak K
  • 10,940
  • 7
  • 30
  • 37
-1
votes
1 answer

Office Automation and Process Affinity

I am doing a bit of Office Automation and when printing a .doc file using VB.NET Office reference DLLs it causes great CPU load so I want to limit those processes to only use a single virtual core. I haven't been able to find anything in Microsoft's…
Rambomst
  • 653
  • 2
  • 10
  • 28
-1
votes
1 answer

Trigger mail on cell edits after saving workbook

I found below code on internet which triggers mail on cell edit, however it is at sheet level. I want for entire workbook and I want to trigger mail only after saving workbook after changes are made. Private Sub Worksheet_Change(ByVal Target As…
-1
votes
1 answer

Outlook is crashing when macro displays data from Excel in mails

I am using for a longer time macro, that I managed to create with help of Internet community. It generally pick up data from Excel and populates in Outlook mails. As I have marked option DISPLAY, I want first check if content is good and then accept…
cosiek
  • 19
  • 5
-1
votes
1 answer

Trying to automatically mail from python script using outlook

ol = win32com.client.Dispatch('Outlook.Application') olmailitem = 0x0 newmail = ol.CreateItem(olmailitem) newmail.Subject = "Hold Notifier " + row['Ticket ID'] +" | "+ row['N/W Customer Number']+" |"+row['Circuit ID']+" | "+row['Customer Name']+" |…
-1
votes
1 answer

Unhandled Exception: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list

Hey I have this error when I try to send an email but only when I publish the app: Unhandled Exception: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. at…
-1
votes
1 answer

MS PowerPoint Presentations.Open method fails

I am trying to find out why the object of Microsoft PowerPoint application doesn't want to open pptx file. This is what I have (C#): using PowerPoint = Microsoft.Office.Interop.PowerPoint; using MSBool =…
Felix L
  • 3
  • 2