Code assistance menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Neth'zul's Avatar Banned
    Reputation
    204
    Join Date
    Nov 2007
    Posts
    887
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code assistance

    Hey guys
    EDIT: I get this when I press change spelling "Public member 'Length' on type 'Range' not found"
    What should I put instead?

    this is the code its in
    strResult = objDoc.Content.Substring(0, objDoc.Content.Length - 1)







    Im using this code.
    Code:
    Dim objWord As Object
    
            Dim objDoc As Object
            Dim strResult As String
    
            'Create a new instance of word Application
    
            objWord = CreateObject("word.Application")
    
    
    
            Select Case objWord.Version
    
                'Microsoft Office Word 2007
    
                Case "9.0"
    
                    objDoc = objWord.Documents.Add(, , 1, True)
    
                    'Office XP
    
                Case "10.0"
    
                    objDoc = objWord.Documents.Add(, , 1, True)
    
                    'Office 97
    
                Case Else ' Office 97
    
                    objDoc = objWord.Documents.Add
    
            End Select
    
    
    
            objDoc.Content = RichTextBox1.Text
    
            objDoc.CheckGrammer()
    
    
    
            strResult = objDoc.Content.Substring(0, objDoc.Content.Length - 1)
    
    
    
            If RichTextBox1.Text = strResult Then
    
                ' There were no spelling errors, so give the user a
    
                ' visual signal that something happened
    
                MsgBox("The spelling check is complete.", vbInformation + vbOKOnly)
    
            End If
    
    
    
            'Clean up
    
            objDoc.Close(False)
    
            objDoc = Nothing
    
            objWord.Application.Quit(True)
    
            objWord = Nothing
    
    
    
            ' Replace the selected text with the corrected text. It's important that
    
            ' this be done after the "Clean Up" because otherwise there are problems
    
            ' with the screen not repainting
    
            RichTextBox1.Text = strResult
    
    
    
            Exit Sub
    
    
    
            Exit Sub
        End Sub
    Last edited by Neth'zul; 07-30-2008 at 07:39 PM.

    Code assistance
  2. #2
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    objDoc.CheckGrammer() doesn't exist.

    And for the love of god, use the code tags.

  3. #3
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Grammar

    This code seems so flawed -.- For one thing, a substring is for a string, not an object. I really don't get your code :P

  4. #4
    Neth'zul's Avatar Banned
    Reputation
    204
    Join Date
    Nov 2007
    Posts
    887
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eh, I got it off of VB fourms! lol

  5. #5
    Function's Avatar Banned
    Reputation
    5
    Join Date
    May 2008
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow haha!!! Should of just stuck with the c++ Programmer huh Neth'zul, think you could possibly could without me... Wrong!

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by r00tk3y View Post
    Wow haha!!! Should of just stuck with the c++ Programmer huh Neth'zul, think you could possibly could without me... Wrong!
    Ignorance is bliss isn't it?

    And Neth'zul, what are you trying to accomplish? I'll write up some quick code to show you the proper way of doing what you're trying to do. (Looks like you're trying to read from a MS Word file)

  7. #7
    Neth'zul's Avatar Banned
    Reputation
    204
    Join Date
    Nov 2007
    Posts
    887
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Man apoc, im trying to make my self a decent web browser with some cool applications and by doing that also learning a bit of vb and god damn rootk3y, who the hell are you? lol

Similar Threads

  1. [Release] [C++] Color Aim Assist Source Code
    By Zobb in forum Overwatch Exploits|Hacks
    Replies: 133
    Last Post: 12-03-2016, 06:14 AM
  2. I need Current PTR Mountain climbing code-Because of error
    By Wildslayer in forum World of Warcraft General
    Replies: 0
    Last Post: 08-16-2006, 08:24 AM
  3. LOTS of WPE codes
    By Örpheus in forum World of Warcraft Bots and Programs
    Replies: 16
    Last Post: 08-04-2006, 01:19 PM
  4. [Bot:Source] Acidic Bot Source Code
    By =sinister= in forum World of Warcraft Bots and Programs
    Replies: 10
    Last Post: 07-03-2006, 05:38 PM
  5. Error in checking WoW.exe CRC code hack?
    By Trichelieu in forum World of Warcraft General
    Replies: 0
    Last Post: 06-11-2006, 02:24 PM
All times are GMT -5. The time now is 06:09 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search