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
1
vote
2 answers

Outlook ItemAdd event not work constantly

I have a tiny C# program which listen to the outlook with ItemAdd event, every time I start the program, it will malfunction after a few days run, for example I start the program on Monday, it will be failure on Thursday, or Wednesday, then it has…
1
vote
1 answer

Write in active Outlook folder

I would like Excel to write in the active folder of Outlook using VBA. But I am struggling to even define the path to the currently active folder. Here is the code I'm trying to use: Sub Test_folder_path() Dim myFolder As Object Set…
Roy R
  • 31
  • 3
1
vote
1 answer

excel vba not converting tamplate to word document

When I try to generate a word document, it gets stopped at the 80% progress bar and it shows the following error. When I try to debug it, I see this I'm getting error in now For i = 1 To .InlineShapes.Count My code Sub…
asad ahmed
  • 49
  • 5
1
vote
2 answers

Link to a location in a Word document from Access form (using VBA)?

I have an Access database that has controls that link to a User Guide (Word file) on our shared drive. In that user guide, I have bookmarks to different sections of the user guide (for example, how to use the "Agreements" subform). At present, my…
Charlie
  • 11
  • 1
1
vote
1 answer

Creating a Downloadable Microsoft Outlook Task

Is it possible to have a Microsoft Outlook task that a person could download from a website and open in Microsoft Outlook and then assign to another person? When I've tried saving a task as a file it won't let me assign it when I open it.
1
vote
1 answer

C# .NET framework using Interop.Word and getting error 'Value cannot be null. Parameter name: pUnk'

I'm using Interop.Word to create a .docx file add some tables, fill it with data and then exporting it to a .pdf. I keep getting this error: System.ArgumentNullException: 'Value cannot be null. Parameter name: pUnk' All the online discussions…
1
vote
1 answer

Macro excel not attaching power point presentation on email

I´ve been trying to attach a power point presentation to a macro excel code to send mails, but when I run the code it only sends the body of the email and not the attached document. The document is saved in a local folder so it shouldn't be an…
Xiomycv
  • 11
  • 1
1
vote
1 answer

Excel VBA Run Time error the second times

Can anyone say me why the second time I run the macro I receive a runtime error? Dim wApp as Object Dim wDoc as Object Set wApp = CreateObject("word.Application") Set wDoc = wApp.Documents.Add(Template:="Test.dotm", Visible:=True) On Microsoft…
Fabio
  • 11
  • 1
1
vote
1 answer

How to send Outlook's Encrypt-Only email (Microsoft Purview Message Encryption) by programing means in C#?

I'm working on WPF application in C#. Some time ago I had a problem with sending an encrypted email through the Outlook. The problem was strongly related to the encryption method - the S/MIME standard. After that it came to my attention there's an…
krzyhur
  • 11
  • 2
1
vote
0 answers

Is there any way to copy and paste the information from excel cell to word with same spacing?

With objWord.ActiveDocument .Bookmarks("FRlegalentity").Range.Text = ws.Cells(i, 4).Value .Bookmarks("OffFRPRDate").Range.Text = Range("DA1").Value .Bookmarks("FRoffadd").Range.Text = ws.Cells(i, 89).Text End with I'm trying…
1
vote
1 answer

Select a non-default sender using Excel VBA

How can I send from a secondary Outlook account using Excel VBA? With OutMail .to = Text(1) .CC = Text(2) .BCC = "" .Subject =text(3) .HTMLBody = Text(10) .Display '.send End With I tried ".from".
Auron
  • 13
  • 5
1
vote
1 answer

To separate code and document in Office automation

I'm currently working on an vba project to help document developers do their work better and faster. The tool is helpful during the developing, but however, it's no longer needed after the document is complete. So, is there any ideas, about how to…
Cauly
  • 370
  • 1
  • 2
  • 12
1
vote
3 answers

Can I reach Global Address List language independently?

I would like to create an excel tool which at some point of the operation opens the Global Address List of the Outlook. I have figured it out how to do this, but there was an issue when we tried it on a German languaged computer. I have solved it…
PEngCs
  • 23
  • 4
1
vote
0 answers

Excel data to word automatically

I want to excel data to word. But ı wrote the code that is not working.Actually it is working but when export data the more rows there are the more word files creating. Can I gather the words files a one word file? I Thank you for answers in…
Motif
  • 69
  • 9
1
vote
1 answer

Creating email drafts in Outlook from Powershell level

This question is more like a plea to get an explanation than help. So, the goal is to create email draft in Outlook using PowerShell script. On 3 systems, the following works as intended: $ol = New-Object -comObject Outlook.Application $Mail =…
Bruce_D
  • 11
  • 2