Photo Gallery
Member List
Search
Calendars
FAQ
Ticket List
Log Out
Forums
Register
Login
My Profile
Inbox
Address Book
My Subscription
My Forums
How to correct the error" Name 'ActiveDocument' is not declared."
Logged in as: Guest
arrSession:exec spGetSession 2,7,51006
Active Users: There are
0
members and
0
guests.
Users viewing this topic: none
Printable Version
All Forums
>>
[General Forum]
>>
Other Programming/Scripting Languages
>> How to correct the error" Name 'ActiveDocument' is not declared."
Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page:
[1]
Login
Message
<< Older Topic
Newer Topic >>
How to correct the error" Name 'ActiveDocument' is... -
8/21/2007 4:38:12 AM
sumit_rai
Posts: 1
Score: 0
Joined: 8/20/2007
Status:
offline
Im a newbie to VB programming. Some part of this code is from net. I want to use three buttons to copy cut and paste . I am getting this error
"Name 'ActiveDocument' is not declared. " Please help me .... if possible can you correct this code.
Public Class Form1 ' Three simple macros to implement a secondary clipboard ' Global to act as clipboard Dim g_lpszSecondClipBoard = "" Sub SecondaryClipBoardCut() 'DESCRIPTION: Performs a cut of current selection to a secondary clipboard. g_lpszSecondClipBoard = ActiveDocument.Selection.Text ActiveDocument.Selection.Text = "" End Sub Sub SecondaryClipBoardCopy() 'DESCRIPTION: Performs a copy of current selection to a secondary clipboard. g_lpszSecondClipBoard = ActiveDocument.Selection End Sub Sub SecondaryClipBoardPaste() 'DESCRIPTION: Performs a paste of secondary clipboard to the current selection. ActiveDocument.Selection = g_lpszSecondClipBoard End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click SecondaryClipBoardCut() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SecondaryClipBoardCopy() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click SecondaryClipBoardPaste() End Sub End Class
Post #: 1
If you found our site useful please link to us
<a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>
.
All Forums
>>
[General Forum]
>>
Other Programming/Scripting Languages
>> How to correct the error" Name 'ActiveDocument' is not declared."
Page:
[1]
Jump to:
Select a Forum
All Forums
----------------------
[Welcome]
- - Forum Rules
- - Test Posting Messages
- - New Member Area/Introduction
[Scripting]
- - WSH & Client Side VBScript
- - WSH & Client Side VBScript Tutorial
- - Post a VBScript
- - Windows PowerShell
- - ASP
- - ASP.NET
- - Windows Script Components
[General Forum]
- - Other Programming/Scripting Languages
- - Suggestions & Feedback
- - Off-Topic Lounge
New Messages
No New Messages
Hot Topic w/ New Messages
Hot Topic w/o New Messages
Locked w/ New Messages
Locked w/o New Messages
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
Forum Software ©
ASPPlayground.NET
Advanced Edition
2.5.5 ANSI