Search:

Type: Posts; User: macropod; Keyword(s):

Page 1 of 20 1 2 3 4

Search: Search took 0.06 seconds.

  1. Two comments: 1. Instead of trying to...

    Two comments:
    1. Instead of trying to hard-format a range, overriding any Style definitions already there, you should define a Style with the required specifications. The macro can then become:
    ...
  2. While that's often true, in this case it's not...

    While that's often true, in this case it's not the bookmark that's being deleted but the range it refers to.
  3. you could, of course, use a text content control...

    you could, of course, use a text content control and let the user type in the date. It's easy-enough to use an exit macro to reformat the date - and even to change it to a date picker after the date...
  4. Try: Sub Demo() Dim BkMk As Bookmark For...

    Try:

    Sub Demo()
    Dim BkMk As Bookmark
    For Each BkMk In ActiveDocument.Bookmarks
    With BkMk.Range
    MsgBox .Text
    If InStr(.Text, "[DELETE") > 0 Then .Delete
    End With
    Next
  5. See attached. Mergefields named SSN and Account,...

    See attached. Mergefields named SSN and Account, respectively, are assumed.
  6. Yes, that's quite easy. Assuming your table has...

    Yes, that's quite easy. Assuming your table has no merged cells, you could use a macro like:

    Dim i As Long
    With Selection
    If .Information(wdWithInTable) = False Then Exit Sub
    With...
  7. Replies
    7
    Views
    124

    You've just proved my point. Really? So why do...

    You've just proved my point.

    Really? So why do you suppose you're having so many issues? The fact you're working with Selections all the time is a clear indication you haven't even taken the time...
  8. Replies
    7
    Views
    124

    \It seems you still don't understand what...

    \It seems you still don't understand what templates are. You create a template once. From then on, any new documents of that kind simply retrieve all their layuout from the template. They have no...
  9. But there isn't anything in a dropdown content...

    But there isn't anything in a dropdown content control that allows one to change the colour upon selecting an item (e.g. red for item 1, yellow for item 2, green for item 3, etc.), which is what the...
  10. The field code I gave already masks all except...

    The field code I gave already masks all except the last four digits of a SSN, so that seems to answer your first question.

    As for account #s, you can use a similar approach, with a field coded as:...
  11. A Content Control Dropdown cannot change item...

    A Content Control Dropdown cannot change item colours when they are selected. The most you can do is change the colour when the user exits the Content Control. This also means that, if they re-enter...
  12. I have never encountered a combo box that, when...

    I have never encountered a combo box that, when populated via .AddItem, listed the items in any order other than that in which they were added. Your code snippet works as expected - the items appear...
  13. Replies
    7
    Views
    124

    You are wasting time creating a template with a...

    You are wasting time creating a template with a macro. The whole point of using a template is so neither you nor your users need to use code for something that is better done manually. All this code...
  14. Replies
    3
    Views
    94

    You would need to bookmark each range in column...

    You would need to bookmark each range in column B, not including the end-of-cell markers, and use a formula field like:
    {={IF{Text1}= "Text" 1 0}+{IF{Text2}= "Text" 1 0}+{IF{Text3}= "Text" 1...
  15. Replies
    7
    Views
    124

    You need to learn to work with Range objects,...

    You need to learn to work with Range objects, besides which, if this is for your template, why are you still trying to do it via code?

    Furthermore, all this hard-formatting you're using is a...
  16. Replies
    3
    Views
    94

    Word fields cannot test text with cell...

    Word fields cannot test text with cell references; only numbers can be tested. To test text, the text would have to be bookmarked; then you can test the bookmark's content. Accordingly, the solution...
  17. Replies
    8
    Views
    152

    You can't do that without a macro unless you're...

    You can't do that without a macro unless you're using mailmerge (which isn't the case here). However, if you add the button and the code for it to the template, you can do it all from the new .docx...
  18. Replies
    8
    Views
    152

    Creating a template is very easy. Simply create a...

    Creating a template is very easy. Simply create a document with all the features you need, then use SaveAs to save it as a template, in the .dot, .dotx or .dotm format, as appropriate. For more...
  19. Replies
    8
    Views
    152

    Sure, the docm extension s for macro-enabled...

    Sure, the docm extension s for macro-enabled documents but, unless you're going to start programmatically adding VBA code to the document you're creating, it'll never need that format. And if you're...
  20. Replies
    8
    Views
    152

    Is there a reason you aren't using a template...

    Is there a reason you aren't using a template with all the formatting & content controls in place? With a template, all the code you posted could be reduced to:

    Sub CreatePFT()
    Dim wdDoc As...
  21. As already discussed here:...

    As already discussed here: http://windowssecrets.com/forums/showthread.php/164905-Help-with-import-images-and-resize-to-Word-doc-script?p=971152&viewfull=1#post971152, there is no 'button'. You're...
  22. Thread: USB Hub

    by macropod
    Replies
    6
    Views
    325

    That depends on which SATA vs which USB....

    That depends on which SATA vs which USB. Furthermore, USB has far broader support, so you're more likely to be able to connect a USB device to a tablet PC or Notebook, for example. Any decent USB hub...
  23. Replies
    6
    Views
    129

    No. UDFs are VBA. Mergefields are fields....

    No. UDFs are VBA. Mergefields are fields. Mergefields cannot run VBA. The only fields that can call a VBA process are MacroButton fields, and they require someone to double-click them - something...
  24. Replies
    6
    Views
    129

    Word fields have no INSTR function, so it's not...

    Word fields have no INSTR function, so it's not surprising it doesn't work...

    As for detecting the &, you can only do that by testing whether it occurs at a known location in the string, by using...
  25. Replies
    6
    Views
    123

    My previous question applies to Word 2003 too....

    My previous question applies to Word 2003 too. Word 2003 will also give a macro security warning if the document has any ActiveX controls or even an empty VBA code module.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4