Dw_list. Accepttext ()
If dw_list. Find (" flag='T' ", 1, dw_list. Rowcount ()) & lt;=0 then
Gn_msg. Of_messagebox (" prompt ", "please select generate record!" )
End the if
Long I, li_FileNum
String ls_rollnumber ls_file, ldt_value
Datetime ldt_jfqx
Datetime ldt_server
Long yzbm//zip
String SJR ZLQR, dah, FMMC SQH, SQR, JFZL
Datetime riqiz, JXR
A decimal jegf, DLF, heji
For I=1 to dw_list. Rowcount ()
If the trim (dw_list. Object. Flag [I])='T' then
The date riqiy
Riqiy=date (gnv_cfp. Inv_dbserver. Of_return_serverdatatime ())
The fees DLF=dw_list. Object. [I]
Combined heji=dw_list. Object. [I]
End the if
Next
OLEObject myword
Myword=Create oleObject
Li_FileNum=myword. Connecttonewobject (" word. Application ")
If li_FileNum & lt; 0 then
Messagebox (" error ", "can't start the Word!" )
The else
Myword. Visible=false
Myword. Documents. The open (" C: \ Users \ \ Administrator \ Desktop \ annual fee remind Ma Jie. Doc ")
Myword. Documents. The item (1). Bookmarks. Item (" riqiy "). The Range. The Text=riqiy
Myword. Documents. The item (1). Bookmarks. Item (" DLF "). The Range. The Text=DLF
Myword. Documents. The item (1). Bookmarks. Item (" heji "). The Range. The Text=heji
End the if
//myword. SaveAs (" C: \ Users \ \ Administrator \ Desktop \ 11. Doc ", doc! , false)
//myword. Activate (inplace!
String docname, named
The int value
value=https://bbs.csdn.net/topics/GetFileSaveName (" save as ", docname, named, "DOC", "the Word document (*.doc), *. DOC")
//IF value<> 1 THEN return
//end if
//if FileExists (docname) then
//if messagebox (' prompt ', 'file already exists to cover? 'the question! Yesno! Then, 2)=1
//filedelete (docname)
//
//end if
//end if
Later won't write
Can only take out into the word don't know how to save to??
CodePudding user response:
Saveas function, parameter as follows, PB call to translate theActiveDocument. SaveAs FileName:="XXXXXXX. Docx, FileFormat:=_
WdFormatXMLDocument LockComments:=False, Password:="", AddToRecentFiles _
:=True, WritePassword:=", "ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False