|
-
Apr 16th, 2009, 05:37 AM
#1
Thread Starter
Lively Member
[RESOLVED] Open XLT through Word
Hey all,
Sorry if this is a daft question, I need to link a Excel template (xlt) into a form in word. We use Word as our main conduite to all things (databases, Word Templates, powerpoint slides etc.. through our normal.dot)
At the moment my code opens the xlt directly, I tried using 'Newtemplate:=False' but that came up with "RT error 448 named argument not found"
Not sure what to try next, can't seem to think of the right context.
Any help would be greatly appriciated
Code:
Sub DLSStructure()
MyappID = Shell("C:\Program Files\Microsoft Office\Office\excel.exe", 1) ' Run Microsoft Excel.
FileSystem.ChDir "K:\" 'Changes the current directory.
Set xl = CreateObject("Excel.Sheet") 'Creates a reference to Excel
xl.Application.Workbooks.Open "K:\Noticeboard\DLS structure\DLS Structure.xlt", NewTemplate:=False 'Opens workbook"
Exit Sub
End Sub
-
Apr 16th, 2009, 07:57 AM
#2
Thread Starter
Lively Member
Re: Open XLT through Word
Found it... Thanks anyways..
in the end all I needed was some food (Fual for the brain)
I recoded the Line - From
Code:
xl.Application.Workbooks.Open _
"K:\Noticeboard\DLS structure\DLS Structure.xlt" 'Opens workbook"
To:
Code:
xl.Application.Workbooks.Add Template:= _
"K:\Noticeboard\DLS structure\DLS Structure.xlt" 'Opens workbook"
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
|