dwe0608
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(docn ame, 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
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(docn
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
thanks for the prompt response... I will try those mthods of search ...
ASKER
Is there a definative resource for msword which talks about using vb and msword ?