![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi, I'm pretty good at VBA, but I'm experiencing something new. I'm designing
an Outlook form on our Terminal Server. I was getting ready to insert some code for a command button, similar to the thread "XLsheet Button Control to Lauch form the Public Drive" in this forum. I'll be openinging a Word Doc instead, but when I went to view the code, I got "Microsoft Script Editor, " instead of the vba code interface. How does this work? Does it use the same basic format? I also am worried that the Outlook "Use Word as the email editor" option might give me problems, since Word will be open already. Here is the rough draft of the code I was thinking of using. Any help would be appreciated! Private Sub cmdHandbook_Click Dim WApp as Word.Application Dim stFilename, stPath as String stPth = "P:\Public Documents\Staff\New Hire\" stFilename = "Employee Handbook.doc" Set WApp = New Word.Application With WApp .Documents.Open(FileName: stpath & stFilename, ReadOnly:=True) .Visible=true End With End Sub Unfortunately, this doesn't work. When I "run this form" I get a popup "Expected End of Statement: Line No. 2", and yes of course I used the real path and real doc name ![]() Office 2003, btw. Thanks in advance! |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Command Button | [email protected] | Outlook - Using Forms | 12 | January 18th 08 06:57 PM |
Open File from Command Button | taborp | Outlook - Using Forms | 10 | October 15th 07 06:32 AM |
Command Button | Daniel Vargas | Outlook - Using Forms | 1 | May 23rd 07 10:35 PM |
command button and multipage | snwooz | Outlook - Using Forms | 1 | November 1st 06 08:26 PM |
Command buttons when using word as email button | [email protected] | Add-ins for Outlook | 1 | October 9th 06 10:27 PM |