|
-
Feb 8th, 2001, 04:30 AM
#2
Frenzied Member
Access to Word:
Put a reference to Microsoft Word 9.0 Object Library into your project.
Then this little snippet will provide access into Word:
Dim Obj
Dim OrigFullFile, As String
Set Obj = Word.ActiveDocument
If Obj.Saved = False Then Obj.Save
OrigFullFile = Obj.FullName
Or use something like:
Set obj = Documents("Report.doc")
You can then manipulate Obj. E.g.
Obj.Tables.Add _
Range:=Selection.Range, NumRows:=2, _
NumColumns:=4
I have never done anything with dialogues, but maybe this can help:
Set dlg = Dialogs(wdDialogFileOpen)
aButton = dlg.Display
fSelected = dlg.Name
If aButton = -1 Then
Documents.Open FileName:=fSelected
End If
For more information about displaying Word dialog boxes, see “Displaying built-in Word dialog boxes” in Help.
Cheers, Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|