Menu gone after merge - Please HELP

R

Robert M

I have about 120 different merge documents I am using. Some of these
work fine, about half. The others will not display the File/Edit main
menu at the top after the merge.

All of the documents that are a problem have either a fill-in or an
ask field.
When I take these fields out the deocument displays and the menu
appears.

I have worked on this for 2 days and can not get this, could someone
advise me what to do so I can get the main menu back after this merge?
Please?

This is just making me crazy. I have tried commandbar vb routines but
not being a Word guru I am really at a loss.

I will be monitoring the group all day, so if you have some input or
want a question answered just let me know.

I am using mailmerge drirectly from an asp dotnet application. I am
calling Word from the application, clientside.

The OS is Windows 2000 pro and Windows XP

Word Versions are Office 2000 and 2002

Thanks in advance
Robert
(e-mail address removed)
 
C

Cindy Meister -WordMVP-

Hi Robert,

So, the documents are being automated? Could you show us the code you're
using to: get an instance of Word and such a document?
I have about 120 different merge documents I am using. Some of these
work fine, about half. The others will not display the File/Edit main
menu at the top after the merge.

All of the documents that are a problem have either a fill-in or an
ask field.
When I take these fields out the deocument displays and the menu
appears.

I have worked on this for 2 days and can not get this, could someone
advise me what to do so I can get the main menu back after this merge?
Please?

This is just making me crazy. I have tried commandbar vb routines but
not being a Word guru I am really at a loss.

I will be monitoring the group all day, so if you have some input or
want a question answered just let me know.

I am using mailmerge drirectly from an asp dotnet application. I am
calling Word from the application, clientside.

The OS is Windows 2000 pro and Windows XP

Word Versions are Office 2000 and 2002

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
B

Bob Morgan

Thanks Cindy;

I am calling Word with mailmerge directly from an ASP dotnet application. I
am calling Word from the application, with clientside vb as follows.

Clientside vbScript from the ASP dotNET app starts Word here. IIS server
serves the client this script. Any document that has a Fill-In field causes
the anomaly.
------------------------
function StartMSWord()
On error resume next
Dim objApp
Dim sDoc
Dim sData
sDoc = "<%=sDocParam.text %>"
sData = "<%=sDataParam.text %>"
Set objApp = CreateObject("Word.Application")
Set objDoc = objApp.Documents.Open(sDoc)
objDoc.MailMerge.Destination = wdSendToNewDocument
objDoc.MailMerge.OpenDataSource sData, , False
objDoc.MailMerge.Execute false

' I have played with the call of Word here removing the following
' with no good results. Right now I have these commented out.

' objDoc.Close false
' Set objDoc = Nothing
' objApp.Visible = True
' objApp.Activate
' Set objApp = Nothing

end function
------------------------

Once this call is made Word is launched, the merge takes place as
expected.

It is stateless so there is no further control after word is launched other
than macro scripts within the document. I originally did not use any
scripts/macros in Word. This worked for Word 97 but no later versions.

Thanks again for your interest it's been lonely out here with this
problem

Robert
 
B

Bob

Hi Cindy;

Here is the code from the clientside vb page in ASP dotNET. I have
used this same code sucessfully with Word 97 but 2000 / 2002 are a
problem. The merge takes place as expected and the document is
displayed but with no menu. I noticed one person discribed it as if
it were a modal preview window.

I am at a loss. I have commented out some of the changes I have made
on the calling page as you can see. But, I getvthe same result.
'---------------------------------------------
function StartMSWord()
On error resume next
Dim objApp
Dim sDoc
Dim sData
sDoc = "<%=sDocParam.text %>"
sData = "<%=sDataParam.text %>"
Set objApp = CreateObject("Word.Application")
Set objDoc = objApp.Documents.Open(sDoc)
objDoc.MailMerge.Destination = wdSendToNewDocument
objDoc.MailMerge.OpenDataSource sData, , False
objDoc.MailMerge.Execute false

'I have commenbted this out but it makes no difference
'objDoc.Close false
'Set objDoc = Nothing
'objApp.Visible = True
'objApp.Activate
'Set objApp = Nothing

end function
'-----------------------------------

The document can be a one liner. The problem is using "Fill-In". As
soon as you add a fill-in field the error occurs. Other wise Word
behaves as expected.

Thank you very much for your response

I thought I had sent this message earlier this morning but I see that
I must not have and hope this is not a duplicate post.

Robert
 
C

Cindy Meister -WordMVP-

Hi Bob,

Try putting these back in again, but put .Activate before .Visible. And
maybe put them in further up in the code, so that they take effect
BEFORE Word tries to display the Fillin fields. Let's see if that helps
at all...
' I have played with the call of Word here removing the following
' with no good results. Right now I have these commented out.

' objDoc.Close false
' Set objDoc = Nothing
' objApp.Visible = True
' objApp.Activate
' Set objApp = Nothing

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top