View Single Post
 
Old 10-17-2016, 05:11 AM
ChrisHanschen ChrisHanschen is offline Windows 10 Office 2016
Novice
 
Join Date: Oct 2016
Posts: 1
ChrisHanschen is on a distinguished road
Default New Word Document not 'at front'

Hello,

I'm using the following code in my Word Addin (VB.NET) to create a new Word-document:

MyDoc = ThisAddIn.MyWord.Documents.Add(Template:=MyTemplat e, Visible:=True)
(MyWord is declared by loading Add-in as MyWord = Me.Application)

This works fine!
But when this Word application already has open documents, the new one is not visible or active.
The new document is behind an other document, I can't get it 'to front'.

I have tryed this:
MyDoc.ActiveWindow.Activate() ' -> not working
MyDoc.Activate() '-> not working

Please help.

Chris Hanschen
LKSVDD architecten Hengelo, The Netherlands
Reply With Quote