6 replies
by fofa
by krambeer
by fenaikh
Hi
pls read this form the folowing URl you will find the code.
Good luck
Mohamed
This is an ActiveX component to merge an access database with a word document. You can choose the database, the table,the fields and the document you want to merge at design time. You can place the fields wherever you want on the document by doubleclicking or drag an drop You have just one method to run OleWord1.merge you can print or make a preview of you document
http://www.planet-source-code.com/xq/ASP/txtCodeId.1038/lngWId.1/qx/vb/scripts/ShowCode.htm
by fenaikh
Hi
More..
this code from
Often, your application may have cause to open a Microsoft Word
document. Rather than accessing it via some directory method, such
as the FileSystemObject or Shell, try opening it directly via Word
Automation. This approach will make it that much easier to read
and manipulate the document's properties and content.
To open a Word document via Automation, you must first work your
way down the object hierarchy to the Documents collection, which
isa member of the top-level Application object. As you can guess,
the Documents collection holds all open documents, and exposes
an Open method. To use this method you simply pass in the full
path of the document you wish to open. The Open method in turn
returns a Document object that represents the document you requested.
Once obtained, you can then read and manipulate the file's contents
as you see fit. The following code shows an example:
Private Sub Command1_Click()
Dim appWord As Word.Application
Dim wrdDoc As Word.Document
Dim strFileName As String
strFileName = "D:\Articles\Title.doc"
Set appWord = New Word.Application
Set wrdDoc = appWord.Documents.Open(strFileName)
MsgBox wrdDoc.Path & "\" & wrdDoc.Name
wrdDoc.CloseFalse
appWord.Quit
Set wrdDoc = Nothing
Set appWord = Nothing
End Sub
by krambeer
by krambeer
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending