• WSMesaka

    WSMesaka

    @wsmesaka

    Viewing 15 replies - 16 through 30 (of 209 total)
    Author
    Replies
    • in reply to: Is it possible to bookmark a Word field using VBA? #1177750

      Thanks. (The Pennsylvania Dutch in me craves as few lines of code as possible!)

    • in reply to: Is it possible to bookmark a Word field using VBA? #1177735

      OK, I managed to kludge this workaround. Any comments? Suggestions?


      [indent]Function InsertBookmarkedField(rngLocation As Range, strButtonText As String, Optional bmkProperty As String) As Range
      Dim NewField As Field
      [indent] Set NewField = rngLocation.Fields.Add(Range:=rngLocation, Text:=”MACROBUTTON nomacro ” & strButtonText, PreserveFormatting:=False)
      NewField.Code.Text = Trim(NewField.Code.Text)
      Set rngLocation = NewField.Result
      rngLocation.MoveStart wdCharacter, -1

      If bmkProperty “” Then ActiveDocument.Bookmarks.Add Name:=bmkProperty, Range:=rngLocation
      Set InsertBookmarkedField = NewField.Result[/indent]
      End Function[/indent]

      (I made the Bookmarking bit optional.)

    • in reply to: File New/My Templates Configuration #1176938

      Ah, I see… sorry. Yes, they do.

    • in reply to: File New/My Templates Configuration #1176936

      No, sorry; let me be clearer. The latest screen cap shows how it looks at present.

      After the first screen cap, I renamed them ALL (without spaces), which had no effect. Then I INSERTED a space in each one, which had the odd effect of pushing “Module 5” to the beginning of the list, with the rest alphanumerically sorted. Then I removed the space from each of the file names. The current appearance is what is shown in the latest screen cap.

      I actually discovered that OTHER people see the same thing, i.e. it’s not sorting according to any pattern that I can discern.

      The list of folders is currently displayed in Windows Explorer sorted by Type (which, in Windows, sorts first by extension and then alphanumerically within type.) However, it didn’t matter at all how I was viewing them; the way they are sorted (e.g. date, reverse date, name) has no effect whatsoever on how they are listed in the dialog box.

    • in reply to: File New/My Templates Configuration #1176930

      That was a good thing to check on, but it’s produced an even weirder sort. Specifically, I renamed them ALL to include a space before the number, and they STILL didn’t sort right. Changing them BACK so that there were no spaces in the filename, I now have THIS!

      I give up…

    • in reply to: File New/My Templates Configuration #1176923

      I tried that, but no luck. In fact, I should mention that other users are seeing the same phenomenon.

      Very wierd!

    • in reply to: Working with ChDir command #1175857

      Thanks, all… very helpful!

      plus ça change, plus c’est la choses mauvais séjour

    • in reply to: Annotating graphics #1169211

      And there ya go… Whoulda thunk?

      Thanks so much for figuring that out. I don’t think I would have even thought of trying that. I will shuffle off with my problem-solving skills humbled.

      Thanks again!

    • in reply to: Annotating graphics #1169201

      That’s what I thought… but when I paste, it pastes below (vertically) the canvas, and the two things appear and behave as independent objects. (For example, deleting the canvas should effectively remove the graphic, shouldn’t it?)

      I was trying to work that way anyway, but the problem was that the lines from any callouts I added wound up behind the drawing that I was annotating, at least until I selected the graphic and used “Send behind text,” which apparently also sent it behind the canvas.

      Something is not working as I expect it to, and I’m not sure whether my expectations are out of line…

      I am attaching a copy of the file to see if it behaves the same for you or anyone else. I applied a light-red outline to the canvas so that its location was readily apparent.

    • in reply to: Format Date in Word 2007 #1168558

      Your initial symptom (native VBA functions not being recognised) is usually down to a missing reference under Tools-References in the VBEditor.

      That’s what I figured, too. But it appeared that all necessary references were present and accounted for. In fact, I couldn’t de-select the reference to VBA even when i tried. But as I said, once I successfully compiled the code (after having to take out the bogus code leftover from Word 2003 that worked with Command bars and the like), it seemed much happier; at least it compiled and ran.

      However, and quite oddly, the word “format” ALWAYS appears in lower-case anywhere in the project, including in completely non-related routines where it is only being used as an argument for the “Find” method. (I should mention that I have no functions or subs defined as “format”, although I once did.) When I use the function in other templates in the same session, however, including in code in NORMAL.dotm, it shows correctly in Init Caps.

      It’s a mystery… the code now runs fine, but something is amiss.

    • in reply to: Format Date in Word 2007 #1168121

      Do you have a module named Format? That would confuse VB.

      I did, but I since removed it. In fact, once I took out (“commented,” actually) the incompatible code so that it would compile, it seems relatively happy. The one weird thing that remains, however, is that “format” will only appear in lower-case now (which was the original case of the “format” module I once had stored in the template.)

      Lower-case function names make me nervous, but maybe someday I’ll open up the VB editor and find it back to normal…

    • in reply to: Format Date in Word 2007 #1168115

      OK, I feel like a beginner again.

      I’m simply trying to format a date, but I’m stumped at every turn. Old functions such as Format(Date, “dd-MMM-yyyy”) won’t run in my new environment.

      Is there a new way to work with dates, or am I missing something? How can I change the date format in my VBA code in Word 2007?

      (BTW, I tried “qualifying” the “format” command–which Word 2007’s VB editor did not recognize–by changing it to VBA.Format(Date,”dd-MMM-yyyy” and it worked. Why on earth would I have to specify VBA? Visual Basic for Applications is set as a reference; in fact, I can’t DE-select it if I wanted too!)

      THE THOUGHT PLICKENS…
      When I write the same code in a brand new template, it works. The template in which i’m working is one that I’m gradually “converting” to be compatible with Word 2007, and which throws errors when I try to compile it (mostly pertaining to CommandBar objects.) So, I suspect that there was something other than “Date” and “Format” not being part of the new environment! Still, that was one cryptic way of failing!

    • in reply to: Word 2007 List Styles and Numbering #1165091

      Much obliged!

    • in reply to: Migrating Notes to Outlook #1162620

      Oh, I didn’t mean to imply that they were deleting it. (I’m in pharma, after all!) But their solution is to either 1) provide us with a URL that will somehow take us to something (webmail?) by which we can continue to access our old files, or 2) have level 2 support reconfigure folks’ Location prefs so that we can still access the NFS file (providing they leave Notes on our system.)

      I’m not at ALL sure why they didn’t feel it necessary to migrate the data, too.

    • in reply to: SetFocus won't in AfterUpdate #1158246

      Sweet! Once again, you guys make me look good.

    Viewing 15 replies - 16 through 30 (of 209 total)