A Visual C# form includes a function to create a blank new Microsoft Document when a specific button is pressed.Once the user has clicked on this button ,I need to check if a new Microsoft Document is already created and still activate before creating a new word document,hence one document is opened at a time.

I'm trying to accomplish this using the code below:-

```
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool  IsWindow(IntPtr hWnd);

```

This will return a bool.I do not know how to check the output?Which parameter will I check and what will be the corresponding syntax?The problem that might arise is that the user can open a notepad and this will be the activate window,hence I need to be specific since it only applies to a word documents.Normally,when a new document is create the default name is Document1,but the user has an option of saving and changing the name.