Link to home
Start Free TrialLog in
Avatar of dwe0608
dwe0608Flag for Australia

asked on

URGENT: MSWORD Query

The following function opens a word document

Public Function OpenNewDoc(Optional docname As String, Optional ro As Boolean = False, Optional atrfl As Boolean = False, Optional bVisible As Boolean = True)

    If Len(docname) > 0 Then
        Set wrdDoc = wrdApp.Documents.Open(docname, ReadOnly:=ro, addtorecentfiles:=atrfl)
    Else
        Set wrdDoc = wrdApp.Documents.Add
        wrdDoc.Select
        Set wrdSelection = wrdApp.Selection
    End If

 wrdApp.Visible = bVisible

End Function

What I would like to do, is open a template document, save it with a predefined file name, and then open the document ...

As much as I can I would also like to use the word object itself to do this ...

I am using Word 11.

Regards

DWE
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dwe0608

ASKER

Yes, it does ....

Is there a definative resource for msword which talks about using vb and msword ?
good question, i'm not sure

what i mostly do is using the object browser in the ms office application [F2 in the vb editor]
most of the info i learned from there, if you can make things work in the office app then port it to VB or any other environment

otherwise i google for the thing i need to know, because most of the time its something that should've been done by others already :-)
and use google groups instead of plain google, the group search is really helpful in finding relevant snippets

thanks for the grade

Avatar of dwe0608

ASKER

thanks for the prompt response... I will try those mthods of search ...