Reply
 
Thread Tools Display Modes
  #1   Report Post  
KZeeh
 
Posts: n/a
Default Can someone translate from word.basic to word.application for me??

I have a mailmerge program (actually written in FoxPro) that stopped working
in Office 2003. I think I need to rewrite b/c it uses word.basic. Is there
anyone that can translate my code into the word.application object? I think
this is what I need to use?
************************************************** ****
oWord = CREATEOBJECT("word.basic")
oWord.AppMinimize(1)
oWord.FileOpen("decision.doc")
oWord.MailMergetoDoc
oWord.WindowList(1)
oWord.AppMaximize('Microsoft Word')
oWord.FileClose(2)
************************************************** *****
This is all the code! Any help would be appreciated. Thank you!
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Something along the following lines:

Dim oWord As Word.Application
Dim oDoc As Word.Document

Set oWord = CreateObject("Word.Application")
With oWord
.WindowState = wdWindowStateMinimize
Set oDoc = .Documents.Open("decision.doc")
With oDoc.MailMerge
.Destination = wdSendToNewDocument
.Execute ' Pause:=something
End With
' The Active Document is now the newly created document
' If you want that, you may not need any code, or maybe:
.ActiveWindow = ActiveDocument.ActiveWindow
' and to close the mail merge main document, try
oDoc.Close savechanges:=wdDoNotSaveChanges
' if you want the mail merge main document,. try
'.ActiveWindow = oDoc.ActiveWindow
.WindowState = wdWindowStateMaximize
Set oDoc = Nothing
End With
Set oWord = Nothing

However, it may not be the fact that it is Word basic that is preventing it
from working. At least one other possibility is that documents with mail
merge dta sources attached will not open correctly when you try to open them
programmatically because of a new security "feature" which requires you to
set up a new registry entry - see

http://support.microsoft.com/default...b;en-us;825765

Peter Jamieson

"KZeeh" wrote in message
...
I have a mailmerge program (actually written in FoxPro) that stopped
working
in Office 2003. I think I need to rewrite b/c it uses word.basic. Is
there
anyone that can translate my code into the word.application object? I
think
this is what I need to use?
************************************************** ****
oWord = CREATEOBJECT("word.basic")
oWord.AppMinimize(1)
oWord.FileOpen("decision.doc")
oWord.MailMergetoDoc
oWord.WindowList(1)
oWord.AppMaximize('Microsoft Word')
oWord.FileClose(2)
************************************************** *****
This is all the code! Any help would be appreciated. Thank you!



  #3   Report Post  
KZeeh
 
Posts: n/a
Default

OK, I tried the registry thing and it did not change my error. I am going to
fool with the word.application object and see what I can come up with.
Thanks so much for the help!

"Peter Jamieson" wrote:

Something along the following lines:

Dim oWord As Word.Application
Dim oDoc As Word.Document

Set oWord = CreateObject("Word.Application")
With oWord
.WindowState = wdWindowStateMinimize
Set oDoc = .Documents.Open("decision.doc")
With oDoc.MailMerge
.Destination = wdSendToNewDocument
.Execute ' Pause:=something
End With
' The Active Document is now the newly created document
' If you want that, you may not need any code, or maybe:
.ActiveWindow = ActiveDocument.ActiveWindow
' and to close the mail merge main document, try
oDoc.Close savechanges:=wdDoNotSaveChanges
' if you want the mail merge main document,. try
'.ActiveWindow = oDoc.ActiveWindow
.WindowState = wdWindowStateMaximize
Set oDoc = Nothing
End With
Set oWord = Nothing

However, it may not be the fact that it is Word basic that is preventing it
from working. At least one other possibility is that documents with mail
merge dta sources attached will not open correctly when you try to open them
programmatically because of a new security "feature" which requires you to
set up a new registry entry - see

http://support.microsoft.com/default...b;en-us;825765

Peter Jamieson

"KZeeh" wrote in message
...
I have a mailmerge program (actually written in FoxPro) that stopped
working
in Office 2003. I think I need to rewrite b/c it uses word.basic. Is
there
anyone that can translate my code into the word.application object? I
think
this is what I need to use?
************************************************** ****
oWord = CREATEOBJECT("word.basic")
oWord.AppMinimize(1)
oWord.FileOpen("decision.doc")
oWord.MailMergetoDoc
oWord.WindowList(1)
oWord.AppMaximize('Microsoft Word')
oWord.FileClose(2)
************************************************** *****
This is all the code! Any help would be appreciated. Thank you!




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I translate an english word to arabic in word2003 imran Microsoft Word Help 1 February 6th 05 06:20 PM
how can I translate an english word to arabic in word2003 Imran Microsoft Word Help 0 February 6th 05 08:39 AM
Translate Entire document is non-selectable in Word 2002? Mark Hunter Microsoft Word Help 1 December 15th 04 02:31 PM
How do i translate text from English to Gujarati using word spartan117 Microsoft Word Help 1 December 9th 04 01:22 PM
how do you translate languages that you don't know? jimbo Microsoft Word Help 1 December 3rd 04 07:58 PM


All times are GMT +1. The time now is 08:53 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"