Results 1 to 13 of 13

Thread: [RESOLVED] Strange problem with Msword using vb code

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2003
    Posts
    233

    Resolved [RESOLVED] Strange problem with Msword using vb code

    Hi

    I have office2000 installed with vb6 on my computer

    The problem is in my prject code when i type

    Dim appWord As Word.Application

    It will be like that
    Dim appWord As WORD.Application

    The word automaticlly become capital

    Also when itype this

    Dim objDoc As Word.Document

    It will come
    Dim objDoc As WORD.Document

    ---------------------------------------------------


    Code:
    Dim appWord As WORD.Application
    Dim objDoc As WORD.Document
    Dim FileName        As String
    Dim TempFileName    As String
    Dim i As Integer
    
        Dim oFooter As Range
        Dim oRange As Range
        Dim oEntry As AutoTextEntry
      
    Dim BoolFlag As Boolean
    BoolFlag = False
        
        SHCreateDirectoryEx Me.hWnd, "c:\Documents and Settings\All Users\Desktop\NEW FOLDER\", ByVal 0&
    
        Set appWord = CreateObject("Word.Application")
        appWord.Visible = False
        appWord.Documents.Add
    '----------------------------
    objDoc.SAVE ' Here also the word Save is Capital
    
    '----------------------------
        appWord.Documents.Close
        appWord.Application.Quit
        Set appWord = Nothing
        Set objDoc = Nothing
    I'm trying to creat folder on the desktop then create a word document inside the folder

    But when i go to the folder there is no word document
    Last edited by jamal464; Feb 10th, 2008 at 05:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width