writing a microsoft word toolbar - ms-office

I want to write a Microsoft toolbar that gets a word from Microsoft Office Word and pass it to other application (Text To Speech) that is written personally. I've searched the web but not so many good ideas. First is it possible? (Sounds yes!) And is there anyone who has faced somehow the same problem? I'll appreciate any ideas.

You can use Visual Studio to create a Word 2007 (or 2010) addin with a Ribbon XML file.
MSDN has a walthough.
For 2003 or earlier, you'll need to create an addin that uses the CommandBars object to add a toolbar.

Related

How to hook a Window Form within Microsft Excel from VBA?

I'm trying to hook a Window Form within Microsoft Excel itself like on the attached picture (This is an Addin called Kutools).
It is supposed to:
Fit on the right side of the Row number
Be Just below the name box
Be resizable and the window is resizable with it as well
Be collapsible or Expandable (like on the image)
I prefer to use the internal VBA of Excel to build and hook it as much as possible. But if I have to use an external Editor (Visual Studio C# or VB. Net ...) I'm willing to follow the instruction.
I searched all over the web but couldn't find a way to do this. I definitely appreciate your kind assistance on this.
Thanks for your help, I'm open to any suggestion!
If I am not mistaken, you are trying to create a custom task pane for Excel (add-in). If so, then this link might help you, but you need to build it with Visual studio using Office development tools:
https://learn.microsoft.com/en-us/visualstudio/vsto/custom-task-panes?view=vs-2019

Lock Drawing Mode VSTO 4.0

i am working on an Excel AddIn Development using Visual Studio Tools for Office (VSTO 4.0).
there is an option in Excel Lock Drawing mode for specific shape which enable a user to draw a shape multiple times.
my requirement is to enable "Lock Drawing mode" (for ElbowConnector) using C#/VB.Net using VSTO 4.0.
i tried to find a solution to this even in VBA but did not get any luck.
Thank you,
Regards,
You can try to execute the built-in button programmatically. The ExecuteMso method of the CommandBars class allows to run the built-in controls programmatically. See Office 2013 Help Files: Office Fluent User Interface Control Identifiers.

Adding navigational buttons to the Outlook CRM 2011 ribbon

I am currently using the Visual Ribbon Editor for CRM 2011 and i am trying to add a button to the Outlook client ribbon (not the web client) that loads the Accounts section of CRM (not in a modal, but the how it would normally load accounts in the main pane) The tabbed section in Outlook is shown in the image below.
I do not have to use the editor, and could use a solution, but i am unsure what sort of command i would need to get it to update the main pane and with either the visual tool or the by hand solution.
Update the HomePageGrid ribbon XML.
Gareth Tucker has written a great tutorial to add a button to the Form ribbon (just modify where it says Mscrm.Form to Mscrm.HomePageGrid):
http://garethtuckercrm.com/2011/01/18/how-to-view-ribbon-definitions-in-crm-2011-3/
Not sure if it's on topic so feel free to trash it. I won't be sad.
There's a fantastic tool called Ribbon Workbech. They even got a video showing how to do stuff, which is perfect for a complicated software in combination with lazy... hrmp... busy people.
There's even more info over here. Have a look.

What's the best language to automate this Windows task involving Outlook and Excel? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I need to automate a particular task that involves:
Fetching mails from my mailbox based on a set of criteria - from a particular user, has a particular pattern of subject line, etc.
Parsing the mail body of each mail and extracting some content (the mails have an almost fixed pattern)
Creating an Excel sheet with a particular template (the first two lines are constant, the third line is the Monday and Friday of this week, etc.) and paste the content extracted above into this sheet in successive lines.
Creating an Outlook email message with the same content in a different format
Attaching the above Excel sheet with this mail.
(Finally sending it, but I don't want to automate that part - I like to double check things before sending out mails.)
Now, when I thought of automating this task, Perl's Win32::OLE came to mind immediately since I'd learnt about it recently, and am very comfortable in Perl. But then, I thought Visual Basic for Automation might be more suited for the task, since it is a language created for such tasks.
My question is, is VBA better enough to offset the difference in my skillset between Perl and VB? I've played with VB6 when I was a kid years ago, but that's about the extent of my VB experience.
I'm open to any other language/platform suggestions as well, provided they allow some flexibility and aren't too difficult to learn. I know some Python as well.
I looked at this and also this, this, this and this, but they either are not relevant, or do not have any good answers.
Disclaimer : I have never worked with Perl or Python.
If you are willing to "step up" from Macros and VBA to using the Visual Studio Office Tools (VSTO) which have been available in .NET for some time now, you have several powerful new options to handle Office interop :
Using the COM API's as exposed via PIA's (Primary Interop Assemblies) usable from C# and other .NET languages : lots of code examples available here on SO or on CodeProject for doing all the things you describe. Suggest you search on "C# Office Interop" "C# Outlook Interop" "C# Excel Interop" "C# Office Automation." Or search on other .NET languages from VB.NET to F#.
With the latest .NET tools you have UI-designers that let you create Add-Ins for Excel or Outlook, etc. I'm working on an Excel add-in in 2010 right now, and it is quite a pleasure to be able to drag and drop WinForms controls onto a WorkSheet and create event handlers, and edit properties, at design-time in the same way I would work in WinForms. Of course, 2010 beta Office has some "rough edges," as you might expect.
VSTO forum on Microsoft : VSTO Forum for Office 2003, 2007
Good "portal" for Office Automation via VSTO : Getting Started (Visual Studio Tools for Office)
VSTO forum on Microsoft for Visual Studio 2010 beta 2 : 2010 beta Be sure and open the drop-down panel under "Announcements" titled "Office Development with Visual Studio 2010 Beta 2 Resources"
Microsoft Office 2010 beta forum : Office 2010
In Visual Studio 2010 beta 2, using the Office 2010 beta, you have no less than six project types related to interop with Excel alone :
Excel 2007 Add-In,
Excel 2010 Add-In,
Excel 2007 Template,
Excel 2010 Template,
Excel 2007 Workbook,
Excel 2010 Workbook : For Outlook : Outlook 2007 Add-In, Outlook 2010 Add-In
This SO thread Beginning VSTO ? may have some value to you, and I suggest you do searches here on SO on "VSTO Excel" and "VSTO Outlook"
I asked Best “official” scripting language for Windows programmers, and the answer was mostly PowerShell. Here's a link I found automating Outlook: using PowerShell for Outlook automation.
$outlook = new-object -com Outlook.Application
Look at the subjects of the first 5 emails you sent
$sentMail = $outlook.Session.GetDefaultFolder(5) # == olFolderSentMail
$sentMail.Items | select -first 5 TaskSubject
And Excel: PowerShell and Excel.
$a = new-object -comobject excel.application
How do I change the value of a specified cell?
$a.ActiveSheet.Range("B1").Value2 = "y"
How about using AutoIt? This has a syntax that resembles VB and can do about just anything plus the documentation is quite comprehensive. Furthermore, you can compile it to a standalone executable for automating the task on another machine that does not have AutoIt. And it has a nice IDE environment to test and debug the automation script.
Hope this helps,
Best regards,
Tom.

Problem with toolbar in Excel 2003

I have a very simple Excel Addin build it in Visual Studio 2008 for Excel 2003, which creates a toolbar with some buttons.
When I debug it, with System Format set to "English (United States)" it works great, without problems.
However, this addin is going to be used with System Format set to "French (France)" too, and when I try to debug my addin under this configuration, the toolbar (which is created by the addin) is not being shown.
While I'm debugging I can see that the methods that create the toolbar are executed and the code returns fine, yet I can't see anything in Excel, and if I switch back the format to English it works again.
Does anyone know which could be the reason?
I had a similar problem with an add-in that I built for Excel 2000. Although the tool bar would show, nothing was on the toolbar. I was able to correct the issue by downloading the
office multilanguage pack 2003.
Here is a link to it, assuming you do not already have this installed it may be worth a shot.
http://office.microsoft.com/en-us/ork2003/HA011402201033.aspx
In the end, there was a problem related with the decimal separator, which changes for French language, and a validation that I was doing in my code, I missed that part when debugging, thanks for the answers anyway.

Resources