Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Recordseparator (6.3 (nl))

    Good morning,

    Can somebody help me with the following:
    I'm creating a button (macro) with which I can merge two files.
    When I perform the merge manually, everything's okay.
    When I record the macro and then play it, it gets stuck on a box in which I still manually have to change the seperators 'TAB' to ';' and 'Enter' to '|'.
    Why is this not possible to run automatically?

    Here's the part of VBA code which it runs, after this it stops:
    ActiveDocument.MailMerge.OpenDataSource Name:="C:Tempmail.txt", _
    ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
    AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
    WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
    Format:=wdOpenFormatAuto, Connection:="", SQLStatement:="", SQLStatement1 _
    :="", SubType:=wdMergeSubTypeOther

    How can I make this possible?

    Many thanks in advance!

    Daphne <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Recordseparator (6.3 (nl))

    Hi Daphne,

    I think the only way to do this is by using SendKeys to fill in the dialog. Insert the following instruction immediately above ActiveDocument.MailMerge ...:<pre>SendKeys ";{tab}{down 30}{enter}{enter}"</pre>

    It works for me in Word 2002, you may have to experiment with the number after down in other versions. It represents the number of times you have to press the down arrow to arrive at the desired record separator.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Recordseparator (6.3 (nl))

    YOU ARE MY GURU!!!!!

    It works!!!

    Now I have the following problem:
    I made a button which executes this macro (the button is IN the document as a command button).
    How can I prevent the button being shown on my print?
    I tried with 'tekenobjecten' (extra, options, print(afdrukken)), but I think I'm searching at the wrong place...

    MANY MANY MANY THANKS!!!

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Recordseparator (6.3 (nl))

    Daphne,

    If you want to use a command button in the document itself, format it as hidden text:
    - select the command button (in design mode)
    - select Format | Font... (Opmaak | Lettertype...)
    - check Hidden text (Verborgen tekst)
    - click OK.

    As an alternative, use a custom toolbar button instead of a command button.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Recordseparator (6.3 (nl))

    Goodmorning!

    I tried to insert a toolbar (this works), but when I start my template it doesn't show.
    I think it's because of the other program I use (SmartControl), which uses these templates to built the right letters.
    So I'm still looking for the right solution, but many thanks for your help!

    Have a nice day!
    Daphne <img src=/S/hello.gif border=0 alt=hello width=25 height=29>

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Recordseparator (6.3 (nl))

    If you put the macro and custom toolbar in a template, then make this template available as a global add-in, the toolbar would be available in all documents, but that may be too much. I don't know SmartControl, so I can't help you with that.

  7. #7
    3 Star Lounger
    Join Date
    Jan 2003
    Location
    Den Haag, Netherlands
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Recordseparator (6.3 (nl))

    Goodmorning Hans,

    It takes a bit long for the helpdesk from the other party to react, so I still have a question:
    The part you explained about the button isn't that clear to me. I cannot find the Hidden text part... (is this another Format that I don't have? I know this sounds stupid, but I don''t know how to see this?).
    What do you exactly mean by design mode (is this the same as 'Werksetbesturingssystemen'?).

    Don't hurry this, I just want to know for myself!

    Many thanks!
    Daphne <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Recordseparator (6.3 (nl))

    Daphne,

    Control Toolbox (Werkset Besturingselementen) is the tool bar. The first button on this tool bar is named Design Mode (Ontwerpmodus) or Exit Design Mode (Ontwerpmodus afsluiten). If this button is "on", your command button in the document won't work, but you can select it by clicking it and change its properties.

    While in Design Mode, select the command button in the document. Click Format | Font... (Opmaak | Lettertype...), and check the box labeled "Hidden" ("Verborgen tekst"). Then click OK.

    Unless you have specified hidden text to be printed in the Print (Afdrukken) tab of the Tools |Options... (Extra | Opties...) dialog, text formatted as Hidden won't be printed. You can still see the button on screen if you show hidden text (check Hidden text in the View (Weergave) tab of Tools | Options...)

Posting Permissions

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