• WSjoelfinkle

    WSjoelfinkle

    @wsjoelfinkle

    Viewing 15 replies - 16 through 30 (of 137 total)
    Author
    Replies
    • in reply to: Extract code from corrupt form? #1156465

      Thanks much everyone:
      1) Saving to 2003 caused a crash, and the 2003-version file still crashed Access 2007 when attempting to open VBA, but it was able to be opened in 2003, and the form and its code examined there
      2) The DECOMPILE switch appeared to repair the file — a life saver. You’d think that “Compact and Repair” might do that, but nooooooo.

      The root cause? I think it may have been closing the database with a breakpoint set in code. I know this has caused problems for me in previous versions of Word, and at one point the code was breaking there even though the breakpoint wasn’t visible — I was able to stop that behavior with “Clear all breakpoints” but shortly after that the VBA was no longer accessible.

      I’ve worked with Access much, much less than I have with Word, but I feel I could already write one of Woody’s “Annoyances” books.

    • in reply to: Extract code from corrupt form? #1156426

      Export to another DB don’t work for that one form, but have you try to import it from another DB. I don’t know if that can make a difference.

      Good ol’ ribbon bar, hiding features from me… but nope, doesn’t work. Same crash when I try to import that one form.

      Thanks for the pointer, I’m sure I’ll use it, but it didn’t fix me here. I guess I’ll have to re-engineer the darn thing. I may have a very early version that can give me a jump start, but I doubt it.

    • in reply to: Macros in 2007 spontaneously disabled (2007) #1139537

      Only Acrobat and EndNote — both of which work fine for other users at the same company — although now a second user has seen this behavior.

      Thanks for the reply,
      Joel

    • in reply to: Can Word say where Sharepoint stores local copies? #1110067

      Andrew, thanks for the suggestion, but no, Word insists that it’s “really” on the Sharepoint server (the URL spec) even when you save the sucker. Saving it to another location would be a bad thing, because then SharePoint doesn’t know how to check it back in.

      I’ve even searched through the registry to see if the temp filename that’s getting created has any relationship to anything (EMC Documentum uses that trick), but it’s not there either — Word must be just storing it in memory, and not telling anybody about it.

      The SharedWorkspaces and related objects don’t reveal any clues either — they only insist on knowing about the URL.
      If it wasn’t for the security model, I’d consider recording a macro on the fly and reading its contents :^P. Actually, automating the Organizer dialog might be a crude and clumsy solution.

      The only other solution I’ve found to this particular problem is to use ActiveDocument.CopyStylesFromTemplate — which despite its name can copy from a document too — but it’s not selective, it copies everything.
      On the other hand, that routine does not seem to lose paragraph style features either! For my next release, I think I’m probably going to bite that bullet.

    • Follow-up: No, it isn’t sufficient, even run three times. OrganizerCopy does not appear to copy the LeftIndent, RightIndent and Tab Stops. I’ve got code already to do this manually, but due to a change in my specs, I wasn’t running that block of code,

      On the other hand, I just found the Document.CopyStylesFromTemplate method — it can’t be limited to specific styles, but it’s faster, and simpler (but will need to wait for my next release)

    • I’ve been in contact with Adobe on these issues — they refuse to admit they’re doing anything wrong.
      I’ve got remedies that appear to mostly work, but it’s not easy, and I’m starting to see some negative results from some of it:

      1) Don’t change the CustomizationContext — this can make your toolbar disappear though, so
      2) Make sure you explicitly show your toolbar at startup (and maybe other times too, see below)
      3) Do a “CommandBars.ActiveMenuBar.Reset” at startup — note that this makes your template, and possibly Normal.dot mark things as changed, so you may want to do “MacroContainer.Saved=True” and “NormalTemplate.Saved=True”
      4) Create a class that initializes an Application object “WithEvents”. Create a routine in it called “Private Sub App_WindowActivate” that will catch when a document is activated, and do steps 2-3 each time.

      Warnings:
      Don’t do these steps if Acrobat isn’t there — you can find it in the ComAddIns collection.
      Don’t reset the menu bar if the doc being activated isn’t visible

      I have code that does all this, but it’s proprietary to our company. The instructions above should be enough to get you going.

    • Eeewww. Three times? Not what I was hoping to find out. I was hoping you’d say, “Oh, it’s a sign of a corrupted file, try saving it out to XML and reading it back in again.” Most of the time, my code works fine.

    • in reply to: 2007 Ribbon – Shortcut Keys on Menus? (2007) #1090591

      I haven’t tried VSTO yet — I don’t have Visual Studio on my 2007 machine, so I’ve not been anxious to start mucking with VSTO. I’ll also take a look at the RibbonCustomizer. It might do the job, it might not, it’s not clear from the docs.

      Thanks.

      [edit]RibbonCustomizer won’t do squat for that — I’ll have to try VSTO. Gut feeling is that it probably won’t do what I need.

    • in reply to: 2007 Ribbon – Shortcut Keys on Menus? (2007) #1090567

      Yes, but you can’t add keyboard shortcuts, so far as I can tell, to commands you have added to Office using the customUI.xml file, except for the hovering “keytip” letters. There’s no equivalent to putting, as I said, Control+Alt+1 on a menu item that drops down from a button or split button on the ribbon, which I could easily do in Word 2003 and previous.

      The only thing I can do is create a macro for each equivalent command in my custom UI, and use the keyboard shortcut customize option to add shortcuts to those, and perhaps add the keyboard shortcut to the toolTip or superTip. By contrast, the code that the customUI.xml points to is not accessible to the keyboard shortcut command, because they have VBA code that takes parameters. But that still doesn’t make the keyboard shortcut visible to the user.

    • in reply to: VBA style delete always deletes from active doc (2003) #1088499

      I did some more experimenting, and doing
      oDoc.Activate
      before deleting the style makes sure that it gets deleted from oDoc.
      And Rudi, yes, I did set a ref to the original active document, and after completion, oOrigDoc.Activate gets me back there.

      I didn’t try making the invisible doc visible, but active did work.

      Still, it’s a bug, a bad bug, but at least i found a way around it.

    • in reply to: Custom icons for built-in commands in 2007 (2007) #1087092

      I’ve been through the first, no help.
      The second I can’t seem to get to right now – site problems?

      In any case, I’ve found some nasty workarounds, requiring callbacks to my template which then execute the built-in functionality, but at least its a single set of callbacks (for Execute, ScreenTip, SuperTip, Pressed, Enabled, etc.) for all the built-ins.

      This sounds like it’s a typical Microsoft short-sightedness, not permitting you to change the icon of a built-in, so that commands always look the same, but if there’s no pic, you should have the chance to change it.

    • Andrew — that’s genius. I’ll see if it’ll fly with my very fussy client. I’d tried hidden text, but that didn’t work.

    • in reply to: Hyperlink without Style? (2000, 2002, 2003, 2007?) #1049021

      > I’m probably missing something, but why not store the character style and re-apply it?
      Because each character could have a different style or no style.
      I’m mainly looking for the generalized case where I can choose whether to slather a Hyperlink style atop the text.

    • in reply to: Hyperlink without Style? (2000, 2002, 2003, 2007?) #1048962

      It took a bit of hacking, and I’m not certain this is goof-proof, but here’s a solution to creating links without the Hyperlink Style:

      Public Sub InsertCleanLink(oBkmk As Bookmark)
      Dim r As Range
      Dim rstart As Long
      ' save the selection and where the original text started
      Set r = Selection.Range.Duplicate
      rstart = Selection.Start
      ' Start with no text selected, and add a new hyperlink
      Selection.Collapse wdCollapseStart
      Selection.Hyperlinks.Add Selection.Range, "", oBkmk.Name, , "###"
      ' Annoyingly, the above line not only moves the selection,
      ' but also expanded the r Range set above.
      ' So now, select the recently inserted text, and trim the r range
      ' back to the original text
      r.Start = Selection.End
      Selection.Start = rstart
      ' Copy the original text into the hyperlink -- this is the sneaky part
      Selection.Fields(1).Result.FormattedText = r.FormattedText
      ' Then get rid of the original text
      r.Delete
      Set r = Nothing
      End Sub
      

      There needs to be some error checking — if the original selection spans cells, it probably can’t create the link, and certainly can’t use the FormattedText copy to move the text. For my purposes, though, this will probably do the job.

      I’d appreciate critiques on the code.

    • in reply to: Does anyone use Formatting Restrictions? (2003) #1006999

      Yeah, that’s pretty much the case. My clients are asking for tools to prevent changes to styles or new styles being added, and I’m trying to accomodate.

      I suggested the idea of all those character styles, and got a resounding “eeeewwwwww”

      Once again, I’m sweeping up behind the elephant.

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