If "myTest.doc" is the active document in the active Word session you could go: Dim sFullFileName As string sFullFileName = ActiveDocument.FullName
or if you have an object variable [MyDoc] pointing to document "myTest.doc" Dim sFullFileName As string sFullFileName = MyDoc.FullName
Write sFullFileName to a textfile and you can read it in the other app.
-- Krgrds, Perry
System: Vista/Office Ultimate VS2005/VSTO2005 SE
"dev" <dev[ at ]discussions.microsoft.com> schreef in bericht news:E946E34C-82F6-4059-BF28-75E7E6F02982[ at ]microsoft.com...
[Quoted Text] > My problem is that I don't know how to get the name of the document > opened. > > How can I get the file name of the opened document? > > For example > The user opened the file named "myTest.doc" and, clicking on a Custom > button > of the Add-in, the Add-in have to put the string "myTest.doc" in some > place. > How can I get that string in vb? > > thank you very much.
|