Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-access > #10574

Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP

From "Ron Paii" <None@none.com>
Newsgroups comp.databases.ms-access
Subject Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP
Date 2015-04-02 07:02 -0500
Organization A noiseless patient Spider
Message-ID <mfjb3o$665$1@dont-email.me> (permalink)
References (1 earlier) <mfeeri$lt8$1@speranza.aioe.org> <03fd8ddd-a1f3-46e4-99f9-6a604fccde26@googlegroups.com> <mfhjht$o2o$1@dont-email.me> <8da9a32f-538b-48be-8209-b44fbe3ecd12@googlegroups.com> <5cb44ce2-b536-489d-a32d-3f8c257a5831@googlegroups.com>

Show all headers | View raw



"fs" <franc.sutherland@googlemail.com> wrote in message 
news:5cb44ce2-b536-489d-a32d-3f8c257a5831@googlegroups.com...
> On Thursday, 2 April 2015 09:20:21 UTC+1, fs  wrote:
>> On Wednesday, 1 April 2015 21:14:50 UTC+1, Ron Paii  wrote:
>>
>> > > On Tuesday, 31 March 2015 16:35:23 UTC+1, Phil  wrote:
>> > >> On 31/03/2015 15:56:52, fs wrote:
>> > >> > Hi all,
>> > >> >
>> > >> > I have an Access 2003 database doing a mail merge to Word 2003. It
>> > >> > works f
>> > >> > ine on two Windows XP machines but not with Windows 7.
>> > >> >
>> > >> > On the Windows 7 machines, a Word application opens and the mail 
>> > >> > merge
>> > >> > data is passed (via a txt file) into the .doc file. But the Word 
>> > >> > Window
>> > >> > doesn' t take the focus and the user has to click on it in the 
>> > >> > taskbar
>> > >> > (which does n't happen with the XP machines).
>> > >> >
>> > >> > As well as that, the menus are frozen/inaccessible and the only 
>> > >> > button
>> > >> > that works is the big red x in the top right. When the user clicks 
>> > >> > that
>> > >> > they a re given the Save As option. They can save the file and 
>> > >> > re-open
>> > >> > it
>> > >> > and edi t as normal.
>> > >> >
>> > >> > My question is what is happening when the initial merge is 
>> > >> > happening
>> > >> > and
>> > >> > th e menus are frozen on the Windows 7 machines? Is this a 
>> > >> > permissions
>> > >> > issue to do with Windows 7 and programs activating each other 
>> > >> > using
>> > >> > VBA?
>> > >> >
>> > >> > I'd really appreciate any suggestions. It's been dragging on for 
>> > >> > ages
>> > >> > and
>> > >> > I can't find any information about it anywhere.
>> > >> >
>> > >> > Thanks!
>> > >> >
>> > >>
>> > >> Assuming you are usimg VBA do you have things like
>> > >>
>> > >>     Dim WordApp             As Object       ' Word.Applicaton
>> > >>
>> > >>     Set WordApp = GetObject(, "Word.Application")
>> > >>
>> > >>     WordApp.Visible = True
>> > >>     WordApp.Activate
>> > >>     WordApp.WindowState = 0          'wdWindowStateRestore
>> > >>
>> > >> Phil
>> > >>
>> > >> ---
>> > >> This email has been checked for viruses by Avast antivirus software.
>> > >> http://www.avast.com
>> > >
>> > > Hi Phil,
>> > > Thanks for replying.
>> > >
>> > > I've tried a couple of ways.
>> > >
>> > > The first one was
>> > > ---------------------------------------------------------------------------
>> > > Dim ow As Word.Application
>> > > Dim xDoc As Word.Document
>> > > dim xFilename as string
>> > > dim xDatasource as string
>> > >
>> > > xFilename = "C:\myDoc.doc"
>> > > xDatasource = "C:\myData.csv"
>> > > Set ow = CreateObject("Word.Application")
>> > > Set xDoc = ow.Documents.Open(xFilename)
>> > >
>> > > ow.Documents(x_filename).ActiveWindow.Activate
>> > > ow.Application.WindowState = wdWindowStateMaximize
>> > >
>> > > With Xdoc
>> > >    .MailMerge.OpenDataSource (xDatasource)
>> > >    .MailMerge.Destination = wdSendToNewDocument
>> > >    .MailMerge.Execute
>> > >    .ActiveWindow.Activate
>> > >    .Windows.Application.WindowState = wdWindowStateMaximize
>> > >    .Close
>> > > End With
>> > >
>> > > ow.Visible = True
>> > >
>> > > -----------------------------------------------------------------------------
>> > >
>> > > The second method was more involved but, I thought, bomb-proof way of
>> > > bringing any application into focus.  It involves using Windows API 
>> > > calls
>> > > to read the application's window caption and bring it forward.
>> > >
>> > > Here's the link for it -
>> > > http://www.everythingaccess.com/tutorials.asp?ID=Bring-an-external-application-window-to-the-foreground
>> > >
>> > > -----------------------------------------------------------------------------
>> > >
>> > > Both of these methods work on the XP machines but neither works on 
>> > > the
>> > > Windows 7 machines.
>> > >
>> > > Any ideas?
>> > >
>> > > Thanks, Franc.
>> > >
>> >
>> > Are you storing the file in the base of the "C" drive? Windows can be 
>> > touchy
>> > about file in that location, try putting it in a folder.
>>
>> Hi Ron,
>> Sorry, no I'm not storing either file in the C drive.  I just put that to 
>> show they were locally stored.  The actual path was a bit long, I thought 
>> it would be easier to just put something like that.  My apologies for 
>> creating the confusion.
>> Thanks, Franc.
>
> Hi Phil,
> I tried that but it didn't change anything I'm afraid.
> I took your idea though and added a couple of new lines
>
> ow.Activate
> ow.Application.WindowState = wdWindowStateMaximize
>
> So the complete code now looks like this
>
> --------------------------------------------------------
> Dim ow As Word.Application
> Dim xDoc As Word.Document
> dim xFilename as string
> dim xDatasource as string
>
> xFilename = "C:\myDoc.doc"
> xDatasource = "C:\myData.csv"
> Set ow = CreateObject("Word.Application")
> Set xDoc = ow.Documents.Open(xFilename)
>
> ow.Documents(x_filename).ActiveWindow.Activate
> ow.Application.WindowState = wdWindowStateMaximize
>
> With Xdoc
>   .MailMerge.OpenDataSource (xDatasource)
>   .MailMerge.Destination = wdSendToNewDocument
>   .MailMerge.Execute
>   .ActiveWindow.Activate
>   .Windows.Application.WindowState = wdWindowStateMaximize
>   .Close
> End With
>
>    ow.Visible = True
>    ow.Activate
>    ow.Application.WindowState = wdWindowStateMaximize
> set ow = Nothing '(this was there already, just forgot to put into the 
> post)
> ---------------------------------------------------------------
>
> With these new lines the problem Windows 7 machine reacts a bit 
> differently.  Now Word opens in the taskbar and flashes and when the user 
> clicks on it the menus are not frozen and they can go ahead with editing. 
> It's progress, but not quite the full solution!
>
> The user has reported that he had the same response of only getting the 
> flashing button in the taskbar when he was using the database on a Windows 
> XP machine but which was XP home edition.  The two XP machines which work 
> as desired are XP Pro machines.  Does this help?
>
> Could the user have changed a Windows setting which stops it happening?
>
>
>
Looking a security features Microsoft added since XP; you may need to add 
the folder to trusted locations. 

Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-03-31 07:56 -0700
  Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP "Phil" <phil@stantonfamily.co.uk> - 2015-03-31 16:35 +0100
    Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-01 04:12 -0700
      Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP "Phil" <phil@stantonfamily.co.uk> - 2015-04-01 13:57 +0100
        Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-02 01:18 -0700
      Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP "Ron Paii" <None@none.com> - 2015-04-01 15:14 -0500
        Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-02 01:20 -0700
          Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-02 02:17 -0700
            Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP "Ron Paii" <None@none.com> - 2015-04-02 07:02 -0500
              Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-07 07:26 -0700
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-08 08:12 -0700
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP "Ron Paii" <None@none.com> - 2015-04-08 15:59 -0500
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-09 02:54 -0700
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP "Ron Paii" <None@none.com> - 2015-04-09 16:02 -0500
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-10 02:36 -0700
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP "Ron Paii" <None@none.com> - 2015-04-10 07:08 -0500
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-14 08:47 -0700
                Re: Word menus frozen after mail merge with Office 2003 on Windows 7 but not XP fs <franc.sutherland@googlemail.com> - 2015-04-27 07:51 -0700

csiph-web