Solved

How to identify the current document in an MSWord 2007 VB.net add-in

Posted on 2009-05-05
1
246 Views
Last Modified: 2013-11-10
I am writing an add-in that saves the current document to a temp directory for additional processing. I placed a a button on a ribbon in my project and now I cannot figure out how to instanciate the current document to get its properties and save it to the temp directory. Can someone please help out with the VB.net code to identify the current document. Note that I am using Word2007 and Visual Studio 2008 SP1. Thanks
0
Comment
Question by:qwerty360
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
irudyk earned 500 total points
ID: 24308837
You could try using Application.ActiveDocument
So, for example, if your addin is named ThisAddIn, you could get the attributes of the active document by using
Globals.ThisAddIn.Application.ActiveDocument
For example
Globals.ThisAddIn.Application.ActiveDocument.Path
would return the path of the current document
Is that what you are looking for?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question