How do I use Visual Studio to edit my Microsoft Office scripts? - vba

I'm a frequent Visual C++ user working on some VBA scripts in MS Office 2010 and I would really like to be able to use Visual Studio 2013 (Professional) to edit them - is this possible? When I try to open my Access Database file from Visual Studio it just loads up in Microsoft Visual Basic for Applications 7.0 (ie. that horrible default IDE)...
What I'd really like is for it to open the module in VS when I click on the module in access. Can this be done?

Related

Using Visual Studio for VBA

I am looking for an opportunity to use Visual Studio for VBA. Specially for Excel Makros. Reason is, to use all the supporting Features of Visual Studio e.g. TFS Connection. Is that possible?
No, but you can create VSTO projects in Visual Studio instead

visual studio 2015 office 2007

my job is to maintain a word-addin, created many years ago, developed by many young programmers like me ;) the addin works fine and there are only a few and easy changes to do from time to time, so my task is to bring the development environment up to date.
The addin was handed over to me as an visual basic project with Visual Studio 2005(in XP-Mode) and a .dot-file
Now I wanted to use Visual Studio 2015, but when I tried to migrate the project there is an error which says the word-version i'm using is not supported by VS2015 and tells me to use Office 2010 minimum. The problem is, my company just uses Office(Word) 2007.
So how can i get VS2015 to migrate the project properly and to use word 2007? Or do I have to use 2010? I read 2010-addins can be used in 2007 and via versa, so this should not be the problem.
Following software is installed:
Microsoft .NET Framework 2.0 SP2
Microsoft .NET Framework 3.0 SP2
Microsoft .NET Framework 3.5 SP1
Microsoft .NET Framework 4/4.5/4.5.1/4.5.2/4.6
Microsoft Office Developer Tools for Visual Studio 2015
Microsoft Visual Studio 2010 Tools for Office Runtime
Visual Studio 2005 Tools for Office Second Edition Runtime
Visual Studio 2015 Community
Microsoft Office Word 2007
thanks for help :) and please excuse my bad english
The short answer is that you cannot use Visual Studio 2015 to open the original project, but you can recreate the code in a new project that will still work with Office 2007:
https://msdn.microsoft.com/en-us/library/bb772080.aspx

Is it Possible to Open a Visual Basic for Devices Project in Studio 2010 or 2013?

I'm evaluating source code that was created in either Studio 2005 or 2008. The solution contains a Visual Basic for Devices project .vbdbproj. I tried to open/convert it in Studio 2010 but could not do so. Since I don't have Studio 2005 or 2008 installed, how can I used either Studio 2010 or 2013 to open this solution?

How to install visual studio tools for office?

How to install visual studio tools for office runtime in order that I can use Word 2010 Document template in Visual Basic 2010?
in Solution Explorer , Right Click on References >> Add References >>Microsoft.Office.Interop
use in your form :
Imports Microsoft.Office.Interop
or find on google Interop.MSDACS.dll an copy to assembly folder,
and Excel example : http://www.dotnetperls.com/excel-vbnet
and for Word ex: clic link here for Word
How to install visual studio tools for office runtime in order that I can use Word 2010 Document template in Visual Basic 2010?
See Visual Studio 2010 Tools for Office Runtime.
VSTO is a part of Visual Studio. It is included in paid editions only. The Express editions are not supported (except the Community edition of Visual Studio 2013).
Typically you need to include the VSTO runtime as a prerequsite to the add-in installer. See Publishing an Office Solution by Using Windows Installer for more information.
If you're using Visual Studio 2015 Community, go to Office Developer Tools
and click "Get Office Developer Tools", which takes you to:
http://aka.ms/getlatestofficedevtools
https://www.visualstudio.com/en-us/features/office-tools-vs.aspx

How to open visual basic 6 program with visual studio.net

I want to open a program (written in Visual basic 6) to be open in Visual Studio.net. Please guide, how could I do that?
While trying to open VB6 (.vbp file) program directly from the OPEN project option in visual studion.net, I was getting this error,
"Visual Basic 6 (.vbp) files cannot be opened in Visual Studio"
I am trying to open in VS 2010.
Visual Studio 2010 does not support VB6 projects. See the link here
From the msdn documentation:
Visual Studio 2010 does not provide tools for upgrading applications and projects from Visual Basic 6.0. If you want to upgrade your project from Visual Basic 6.0 to Visual Basic 2010, you can use the upgrade tools provided with earlier versions of Visual Studio and then upgrade the project again in Visual Studio 2010.
Visual Basic Tools for Visual Studio
There's a plugin called Visual Basic Tools for Visual Studio that provides the following features:
load classic VB workspace- and project-files and offers quick access to the extension´s options
integrates with the solution explorer and the code editor having support for syntax highlighting, basic outlining (allows to expand/collapse methods, properties and types) as well as navigation bar support.
Classes, Types, Modules, Forms and Controls can be inspected using the Object Browser and Class View.
From the reading, it's unclear if you can actually build the project, though it does say:
The import tool creates a new solution and MSBuild compatible projects.
Links to the plugin by VS Version
2012-2013
2015
2017
RAD Basic
There is also an independent IDE called RAD Basic that claims the following features:
New and modern IDE (Integrated Development Environment) with form designer supporting drag and drop, code completion, refactoring tools, etc.
RAD Basic Compiler: Compiler 100% compatible with your VB6 project (vbp, frm, bas and cls files). Generate native executables (exe and ocx) in both 32-bit and 64-bit.
RAD Basic Forms: Reimplementation of common VB6 controls and components supporting 32-bit and 64-bit.
etc.
Speaking from my experience, it's not easy to open a Visual Basic 6.0 project in any versions of Visual Studio above 2008.
Although 2008 and below versions do provide an automatic function to convert Vb6 code to the VB.net framework. But, the problem starts after the conversion - it can skip some code, add functions/variables on its own, or modify the functional behavior on its own, and with that the VB.proj will be created with errors and you will not be able to open it anywhere as a solution file. The same with any 3rd party tools.
If you want to open the VB6 code try Visual Basic 6.0 Portable edition.
But headache will still follow you there, please refer this link
Installation of VB6 on Windows 7 / 8 / 10
Make sure you are clicking on the project file itself... Right click on the file and select "Open With" and select your visual studio program. It may need to be converted and if so, it will prompt you to convert the project.
Thanks!
Download Visual Basic Tools for Visual Studio,allows to work with classic VB workspaces and projects