Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to supress OpenFile dialog box in Word97
Message
 
To
16/02/2004 10:11:58
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00877644
Message ID:
00879991
Views:
22
Try:

thisform.oWord.Documents.Open(FULLPATH(m_name))

>I use MailMerge. Every time i create a SourceFile for my main documets. In Word2000/XP there is no problem but in 97 always open file dialog box appears when I open Main document. Here is my code:
>
>=SYS(3005, 1033)
>thisform.fl_error   = .t.
>msg_error           = ON("ERROR")
>fl_error            = .f.
>ON ERROR fl_error   = .t.
>thisform.nLocaleId = VAL(SYS(3004))  && Save local id
>=SYS(3006,1033)                      && We will be sending instructions in English
>DO WHILE TYPE("thisform.oWord") # "O" .OR. ISNULL(thisform.oWord)
>   thisform.oWord             = GetObject(,"Word.Application")
>   IF TYPE("thisform.oWord") # "O" .OR. ISNULL(thisform.oWord)
>      thisform.oWord = CreateObject("Word.Application")
>   ENDIF
>ENDDO
>thisform.oWord.DisplayAlerts = 0
>thisform.oWord.Visible = .f.
>
>* Here open file dialog box is raised on the screen
>thisform.oWord.Documents.Open(m_name)
>
>thisform.oWord.Caption = ALLTRIM(Blanki.Name)
>WITH thisform.oWord.ActiveDocument.MailMerge
>     .OpenDataSource(m_name1)
>ENDWITH
>
>ON ERROR &msg_error
>thisform.fl_error = .f.
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform