PC Review


Reply
Thread Tools Rate Thread

Macro target to MsWord

 
 
=?Utf-8?B?UGFyYW0=?=
Guest
Posts: n/a
 
      18th Mar 2006
Pls correct me on this formula: something wrong on opening file.

Sub openreport()
myPWD = Application.InputBox("Password Protected! Please Enter Authorized
Password to Continue!")
If myPWD = "ems5657sifooc1" Then
Application "C:\EMS-Senior1\Individual Report Class1.doc"
Else
MsgBox "Wrong Password! Bye!"
End If
For Each w In Workbooks
w.Save
Next
Application.quit
End Sub

 
Reply With Quote
 
 
 
 
Daniel CHEN
Guest
Posts: n/a
 
      20th Mar 2006
Not quite sure where did you get the following statement:
Application "C:\EMS-Senior1\Individual Report Class1.doc"
-- the purpose is to open the file, right?

Try to replace it with this one and re-run your code:

Shell "WinWord C:\EMS-Senior1\Individual Report Class1.doc"

It worked in my PC!

--
Best regards,
---
Yongjun CHEN
=================================
XLDataSoft - Data Analysis Expert, Excel/VBA Specialist
- - - - www.XLDataSoft.com - - - -
Free Excel-Based Data Processing Tool is Available for Download
=================================



"Param" <(E-Mail Removed)> wrote in message
news:B0C5F7B4-F33C-438F-8DF6-(E-Mail Removed)...
> Pls correct me on this formula: something wrong on opening file.
>
> Sub openreport()
> myPWD = Application.InputBox("Password Protected! Please Enter Authorized
> Password to Continue!")
> If myPWD = "ems5657sifooc1" Then
> Application "C:\EMS-Senior1\Individual Report Class1.doc"
> Else
> MsgBox "Wrong Password! Bye!"
> End If
> For Each w In Workbooks
> w.Save
> Next
> Application.quit
> End Sub
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why has MSWord suddenly blocked all of my old MSWord files? dsmetts Microsoft Word Document Management 1 21st Nov 2008 05:17 PM
Opening msWord (2003) always generates a blank window. (Even if I reinstall msWord!) ship Windows XP General 7 17th May 2006 07:19 PM
DOT formatting is changing in documents (MSWord 2002/MSWord 2003) Christi Microsoft Word Document Management 1 13th Jul 2004 02:47 PM
Major differences between MSWord 2000 and MSWord 2002? =?Utf-8?B?S2ltam9y?= Microsoft Word Document Management 2 26th Dec 2003 06:00 PM
"Save Target as" and "Print Target" does not work Tania Windows XP Internet Explorer 2 15th Oct 2003 07:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:23 AM.