G
Gary
hello
i have problem with insertfile command,
the following code is
Dim objWord As New Word.Application
objWord.Documents.ADD Application.CurrentProject.Path & "\SC1.dot"
objWord.Visible = True
objWord.Selection.EndKey Unit:=wdStory
objWord.Selection.InsertBreak TYPE:=wdPageBreak
objWord.ChangeFileOpenDirectory "C:\20070117\"
objWord.Selection.InsertFile FileName:="aaaa.doc", Range:="",
ConfirmConversions:=False, Link:=False, Attachment:=False
objWord.Selection.InsertBreak TYPE:=wdPageBreak
With objWord.ActiveDocument.Bookmarks
.Item("comnum").Range.Text = Forms!mainform!COMNUM
.Item("comnum1").Range.Text = Forms!mainform!COMNUM
.Item("comnum2").Range.Text = Forms!mainform!COMNUM
End with
thanks thaks,
i have problem with insertfile command,
the following code is
Dim objWord As New Word.Application
objWord.Documents.ADD Application.CurrentProject.Path & "\SC1.dot"
objWord.Visible = True
objWord.Selection.EndKey Unit:=wdStory
objWord.Selection.InsertBreak TYPE:=wdPageBreak
objWord.ChangeFileOpenDirectory "C:\20070117\"
objWord.Selection.InsertFile FileName:="aaaa.doc", Range:="",
ConfirmConversions:=False, Link:=False, Attachment:=False
objWord.Selection.InsertBreak TYPE:=wdPageBreak
With objWord.ActiveDocument.Bookmarks
.Item("comnum").Range.Text = Forms!mainform!COMNUM
.Item("comnum1").Range.Text = Forms!mainform!COMNUM
.Item("comnum2").Range.Text = Forms!mainform!COMNUM
End with
thanks thaks,