Results 1 to 2 of 2
  1. #1
    chappy72 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    2

    Create a new Word-instance, probs with Citrix

    Hello everybody

    I've got a strange problem with Access 2010 32-Bit SP1 on a Citrix Server.
    I have a small procedure that opens Word and should create a new document.


    Here you can see the code:
    Code:
    Dim objWord As Object
    Dim objDoc As Object
    Dim rng As Object
    
    vFile = "P:\Adressen\Vorlagen\Brief.dotx"
    Set objWord = CreateObject("word.application")
        'objWord.Visible = True
        Set objDoc = objWord.Documents.Add(Template:=vFile)
        If objDoc.Bookmarks.exists("bAnschriftStandard1") = True Then
            Set rng = objDoc.Bookmarks("bAnschriftStandard1").Range
            rng.Text = "Test"
        End If
    Set objWord = Nothing
    End Sub
    First of all: on four local installations it works perfectly. The problem only occurs on Citrix (the same Office version as local).

    If line 7 is inactive, I get an error in line 9:
    "4248, The command is not available, because no document has been opened" (or something like that, I've got only the German version)

    In a German forum I've got the hint with line 7. So if I activate it, sometimes it works, but sometimes it doesn't and then another error appears in line 8:
    "424, Object needed"

    The most strange thing here is, that every time I go through my procedure step by step with F8 it works fine. Only if I start the procedure by clicking the button in the form it doesn't work.

    Has anybody an idea what the problem could be?

    Thank you very much!
    Daniel

  2. #2
    chappy72 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    2
    sorry...wrong forum.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 04-28-2011, 02:28 AM
  2. Multiple Instance Form
    By steve.roic@bellsouth.net in forum Forms
    Replies: 0
    Last Post: 05-19-2010, 11:18 AM
  3. Nightmare- Importing probs...and more
    By UCBFireCenter in forum Import/Export Data
    Replies: 14
    Last Post: 01-05-2010, 07:18 PM
  4. cmd button probs- easy fix..help
    By burgicide in forum Forms
    Replies: 4
    Last Post: 11-20-2008, 03:28 PM
  5. create word documet for each record
    By datto in forum Programming
    Replies: 0
    Last Post: 02-11-2007, 06:57 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
  •  
Other Forums: Microsoft Office Forums