Click to See Complete Forum and Search --> : Microsoft.Office Components?


Calculator
May 23rd, 2009, 07:14 PM
I'm trying to compile some source code that uses microsoft office task panes and to work with some speech recognition.

Code is from the following article

Enabling Speech Recognition in Microsoft Word 2007 with Visual Studio 2008 - http://msdn.microsoft.com/en-us/library/dd148511.aspx

The code for download is here
http://code.msdn.microsoft.com/SpeechRecoWordAddin

When I compile the project I get errors

------ Build started: Project: SpeechRecoWordAddIn, Configuration: Release Any CPU ------
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections.Generic,System.Linq,System.Text,System.Xml.Linq,"Office = Microsoft.Office.Core","Word = Microsoft.Office.Interop.Word",Microsoft.Office.Tools.Word,Microsoft.Office.Tools.Word.Extensions /optioncompare:Binary /optionexplicit+ /optionstrict:custom /nowarn:42016,42017,42018,42019,42032 /optioninfer+ /removeintchecks- /rootnamespace:SpeechRecoWordAddIn /doc:obj\Release\SpeechRecoWordAddIn.xml /define:"CONFIG=\"Release\",TRACE=-1,PLATFORM=\"AnyCPU\"" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Accessibility.dll,"C:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12\Microsoft.Office.Interop.Word.dll","C:\Program Files\Reference Assemblies\Microsoft\VSTO\v9.0\Microsoft.Office.Tools.Common.v9.0.dll","C:\Program Files\Reference Assemblies\Microsoft\VSTO\v9.0\Microsoft.Office.Tools.v9.0.dll","C:\Program Files\Reference Assemblies\Microsoft\VSTO\v9.0\Microsoft.Office.Tools.Word.v9.0.dll","C:\Program Files\Reference Assemblies\Microsoft\VSTA\v9.0\Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll","C:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12\Office.dll","C:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\stdole.dll","c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.AddIn.dll","c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll","c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll",c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll,c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll,c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll,"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Speech.dll",c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll,c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll,"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug:pdbonly /optimize+ /out:obj\Release\SpeechRecoWordAddIn.dll /resource:obj\Release\SpeechRecoWordAddIn.Resources.resources /resource:obj\Release\SpeechRecoWordAddIn.SpeechRecoUserControl.resources /target:library SpeechRecoUserControl.Designer.vb SpeechRecoUserControl.vb ThisAddIn.vb ThisAddIn.Designer.vb "My Project\AssemblyInfo.vb" "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb"
C:\Documents and Settings\Colin Diesh\Desktop\SpeechRecoWordAddIn\SpeechRecoWordAddIn\ThisAddIn.Designer.vb(128) : error BC30456: 'BeginInit' is not a member of 'Microsoft.Office.Tools.SmartTagCollection'.
C:\Documents and Settings\Colin Diesh\Desktop\SpeechRecoWordAddIn\SpeechRecoWordAddIn\ThisAddIn.Designer.vb(136) : error BC30456: 'EndInit' is not a member of 'Microsoft.Office.Tools.SmartTagCollection'.
C:\Documents and Settings\Colin Diesh\Desktop\SpeechRecoWordAddIn\SpeechRecoWordAddIn\ThisAddIn.Designer.vb(147) : error BC30057: Too many arguments to 'Public Sub New(runtimeCallback As System.IServiceProvider)'.
C:\Documents and Settings\Colin Diesh\Desktop\SpeechRecoWordAddIn\SpeechRecoWordAddIn\ThisAddIn.Designer.vb(170) : error BC30456: 'Dispose' is not a member of 'Microsoft.Office.Tools.SmartTagCollection'.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

I don't really know what it means, it's errors on operations performed by

Friend WithEvents VstoSmartTags As Microsoft.Office.Tools.SmartTagCollection

The MSDN says that it has all these methods http://msdn.microsoft.com/en-us/library/microsoft.office.tools.smarttagcollection_methods.aspx

So I don't really know, any advice?

dglienna
May 23rd, 2009, 10:27 PM
It has this, first...

A custom task pane for Microsoft Word 2007 with VSTO and Visual Basic 2008 which allows interaction with Windows Vista's speech

VSTO is Visual Studio Tools for Office

Calculator
May 24th, 2009, 12:34 AM
I don't really understand, I read that VSTO is it's own IDE or something but I can't tell how I get it? I mean, most uninformative page ever is the homepage -- http://msdn.microsoft.com/en-us/vsto/default.aspx

dglienna
May 24th, 2009, 12:09 PM
It's built into some versions of Visual Studio. I guess if you don't have it, you can't use it. http://visualbasic.about.com/b/2006/05/17/vsto-and-visual-basic.htm

There is the new version that you can probably download a trial version of