I have VS 2013 installed and Microsoft Office 2010 and I want to create a new project using Word 2010 document as my template, but I don't see the option for this version. Only Word 2013 Document template is available, but since I don't have it installed I get an error Cannot create project because the application associated with this project type is not installed on this computer. You must install the Microsoft Office application that is associated with this project type. Can I use a 2010 Word template, if so how?
You can use the very helpful answer in the below link:
VSTO Tools: Office 2010 to 2013 upgrade
I think you can try only one of the points mentioned in the answer:
Under the
Project\ProjectExtensions\VisualStudio\FlavorProperties\ProjectProperties
element find the "OfficeVersion" attribute/value pair and remove it
(so the attribute that reads OfficeVersion="14.0" -- delete that). --
Leave all other 14.0s intact, if anything got changed to 15.0,
downgrade it back to 14.0 (and again, if it's a reference, set
SpecificVersion to false). -- Do not worry about changing any GUIDs,
just leave them as they are!
Let me know if that works for you.
Related
I needed a library to create QRcodes in ms access 2013 and I found this one.
http://en.code-bude.net/2013/10/17/qrcoder-an-open-source-qr-code-generator-implementation-in-csharp/comment-page-1/#comment-101119
It's under MIT license so is convenient.
I tried using the sample code provided by the author in Visual Studio C# and It worked fine. But I can't add the reference in Access 2013 W 8.1.
I've tried to add the reference trough the VBA editor In Tools>Reference then browse for it.
Is there a way to get around this problem?
I am trying to read from a .docx file (MS Word 2013) using vb.net and find and replace multiple words within the same document. I do not want to make use of a plugin or add-on within vb.net but rather program this myself.
Which libraries or references within vb.net will give me the ability manipulate MS Word documents with the .docx file extension.
Any related vb.net code for Visual Studio 2013 would be greatly appreciated.
I have found the following related information (https://support.microsoft.com/en-us/kb/316383) although I am finding difficulty in adapting it for Visual Studio 2013.
Below is a list of COM references directly from Visual Studio 2013 and the only similar option with reference to the above link seems to be the checked item in the screen print below:
Seems that after a bit of "connecting the dots" from everyone's commentary (thank you) I was missing an imports reference that works with the "Microsoft Word 14.0 Object Library" associated with MS Word 2013.
With reference to https://support.microsoft.com/en-us/kb/316383, the imports reference that I found was adapted from the question: How to load Word Object Library properly in Visual Studio Express i.e. adding the following to the top of the object class solves this question:
Imports Microsoft.Office.Interop
You can use DocX to replace text in one or muliple documents, check the sample code here - Replace text across many documents in Parallel . Hope I am not misunderstanding you.
To run your application you need to have MS Word installed on the PC. I'd consider using the Open XML SDK instead. See Welcome to the Open XML SDK 2.5 for Office for more information.
We have some access databases (executed via runtime) that are using Office 2010 x86. We will be upgrading to Office 2013 x64 and the upgrade process is causing the errors since the .accdb file references the Excel and Outlook 14 libraries. I am looking for a way to dynamically update the reference via vba on db open. Does anyone know if I can do this on a system using the access runtime? I think I can use the References.IsBroken method and AddFromFile or AddFromGUID to do the update.
As far as I remember, you can't update the references on the fly from the runtime.
Mixing Office versions can cause lots of headaches, especially when mixing 32/64 bits versions of Office. You should convert each of your database to Access 2013 (if that's what you will be using on all machines) once and switch to using the Access 2013 runtime.
I am struggling to find a straight forward guide to creating office addins using VSTO and VB.net.
Specifically I would like to know how to be able to create a addin/ dll which can either be referenced from VBA in the form:-
Addin.method(argument) or Addin.property = X
Or which would install its own custom toolbars/ ribbon interface to an aspect of office for example Word.
I've checked MSDN and in terms of legibility and usability of the explanations I have drawn a blank so far.
I currently have a requirement to create at least one addin for Office 2000 to run and manipluate SQL and then a suite of addins for a customized Office 2007 (Word) set-up.
Adding global named items to the script engine from VBA code requires the script engine expose itself via IActiveScript::AddNamedItem. I doin't think Microsoft would do it anytime soon as this could break existing VBA code.
Got this working :-)
Using a class libary project and ComInterface / ClassInterface.
When I add a reference to Office COM Library, I to go:
References
Add Reference
Select the COM tab
Select Microsoft Office 12.0 Object Library
And magically named reference appears:
Microsoft.Office.Core
The Project.csproj file shows the details of the reference:
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>4</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
i check the project into source control, and now nobody else can build the solution; they do not have Office 12, they only have Office 11.
Another guy checks out the .csproj file, deletes the reference to:
Microsoft Office 12.0 Object Library
and re-adds the COM reference as:
Microsoft Office 11.0 Object Library
After that, and new reference appears in the Solution:
Microsoft.Office.Core
and the Project.csproj file shows the details of the reference:
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
Note: Readers who read the question will understand the problem. It's the same type library, but version 2.3 as opposed to version 2.4.
The project is then checked into source control, and now developers with Office 2007 (and Office 2000 for that matter) cannot build it, because Visual Studio cannot resolve the reference to:
{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}\2.3\0\primary
We obviously need a version independant way to reference Office.
How do we reference the version of Office that the developer building it on his machine has intsalled?
How do we have multiple developers work on a solution that references Office?
Note: This question is identical to, but fundamentally different from, another Stackoverflow question How to use Office from Visual Studio C#?
That question deals with the entire set of problems from trying to use Office from Visual Studio. This question only focuses on one specific problem.
Abstract your code so that ALL of the code that touches Office is in a separate project. Then you can have two projects - one for Office 11 and one for Office 12. Then reference both projects from your application. If the classes both implement a common interface, then you can use a factory pattern to instantiate the appropriate one and use the features without having to recompile.
You might be able to use late binding for this.
Have a look here: http://www.hanselman.com/blog/BackToBasicsVarDim.aspx
or here: http://support.microsoft.com/kb/302902
late bind to whichever type library is present, and code against the older interfaces - if youre using the v11 interfaces, you should be ok when you ve got v12 on a machine.
If you abstract the interface to a separate project you can then then use vb.net and its built in late binding support to provide the functionality and manage resources.