Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Office Automation (http://www.xtremevbtalk.com/-net-office-automation/)
-   -   How can I pass a VBA variable into VB.net (http://www.xtremevbtalk.com/-net-office-automation/327681-pass-vba-variable-vb-net.html)

dd8 07-01-2015 09:43 PM

How can I pass a VBA variable into VB.net
I wasn't quite sure which forum to post this in vba or vb.net :)

vb.net in VS2013

From my vb.net solution I call vba code to execute from a global Word 2013 template located in
C:\Program Files (x86)\Microsoft Office\Office15\STARTUP

once the vba code completes I want to pass the vba variables back to vb.net to use the variables to continue executing the vb.net code

how can I achieve this



Gruff 07-02-2015 09:27 AM

Typically you would use Microsoft Automation from VB.NET to open your Word template file, run your VBA macro, and collect your variable data through the Word API.

Personally I would move the VBA Code into VB.NET and dispense with the VBA macro.

Search on the keyword Office Automation for code samples.

All times are GMT -6. The time now is 09:26 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.