Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Referencing currently open Word documents

$
0
0

Hi,

I'm trying to populate a combobox with a list of currently open MS Word documents. In VBA it is done like this:

   For Each wb In Application.Documents
wbname(q) = wb.Name
q = q + 1
b = b + 1
    Next wb


For a = 0 To b - 1
With Me.docum
.AddItem wbname(a)
End With
Next a

Where wb is each document and docum is the combobox to populate. However application. documents won't work in VB.NET, how else would I do this? Ultimately I would want a user to select the document they want and save it to an appropriate folder.

I've imported Microsoft.Office.Interop.Word and managed to do a few things with it, but this has me stumped!

Thanks,

Matt


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>