Selection/Range.MoveEndUntil crashes word when encountering a comment

 have a word add-in that manipulates selected text by reformatting it in various ways (specifics not important). One function not only manipulates the selected text, but also expands the range to include text prior to the users selection up until the previous
line break. Code:
Dim rng As Microsoft.Office.Interop.Word.Range = sel.Range
With rng
.MoveEndUntil(Cset:=vbCrLf, Count:=Word.WdConstants.wdBackward)
End With
End If
So this code has been working great, unless there are comments in the range that is being expanded into, in which case word crashes without triggering any sort of error in visual studio. After experimentation, I've concluded it's the vbCrLf Cset that breaks
when it encounters a comment, since if I .MoveEndUntil a random string (i.e. "123") it moves past a comment just fine. My best guess is that the special character word inserts at comment points is interfering with vbCrLf, but I'm at a loss of how
to avoid the issue. I've also tried vbNewLine, but that produces the same problem. Mainly because in office vbCrLf = vbNewLine.
I could delete all comments in the documents, or deactivate the function if any comments exist, but it will really inhibit functionality for the end user. Any help appreciated. 

Hi SJLD,
I've reproduced this problem, it'll also crash the Word application in VBA code. This only happens when Count=wdBackward, not for wdForward. I think this might be some unknown issue. I'll involve some other engineer into this case. If there're any updates,
we'll come back.
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Just updated 2.2.12 crashes Word when "saving as"

    Updated on 2.2.12 and Word does not respond after selecting "save as".  I change name of old files after updating info weekly.  What is the solution???

    Latest Security Update is causing headache for PPC programs in 10.6 Rosetta
    Restore
    Backup files off the computer (not TimeMachine) and disconnect.
    If you have TM, or a option key bootable clone use that to erase and restore from.
    If not, c boot off the 10.6 disk, use Disk Utility to >Repair Disk and Permissions,  (do not format or erase!!) and simply re--install 10.6 from the disk.
    Note: This 10.6 reinstall does not touch your files and most programs (provided you don't erase), but backup your files regardless.
    Note: If Disk Repair gives a error that is not repaired, then you have to consider erasing the drive (with Zeros) and try reinstalling 10.6 fresh or replacing the drive.
    Reboot and log in, update to 10.6.8, it should not include the security update at this time (second pass it might show) because it was just released and they might need to pull it. (they need to pull it)
    When you reboot, make sure to reinstall any programs that installed kext files into OS X, you'll know, they won't work.
    If you get gray screen, hold the shift key while booting and update your installed software so it's compatible with 10.6.8.
    Note: If any of this is beyond your ability, no problem, I'm no brain surgeon neither, call in a professional before you lose your data.
    Learn how to clone here
    http://www.bombich.com/get_ready_for_lion.html
    TM help here
    http://pondini.org/OSX/Home.html
    Learn how to make copies of your 10.6 disks here
    http://www.walterjessen.com/make-a-bootable-backup-snow-leopard-install-disc/
    Learn how to make a bootable SL USB
    http://www.maciverse.com/install-os-x-snow-leopard-from-usb-flash-drive.html
    Learn which programs ARE NOT compatible with Lion
    http://roaringapps.com/apps:table
    Long live the Snow Leopard.

  • Selecting a color for words when using Type tool

    Mark,
    I was successful with adding names to photographs using the Type tool as you suggested, but at only a gray shade. In order to stand out on certain backgrounds is there an option in Elements 5.0 for adding text in either white or black letters?

    The Type tool sets the text color to the current foreground color. You set this color by clicking on either the foreground color box at the bottom of the tools menu or the color box in the toolbar.
    However, since your text is gray I'm guessing your picture is in Grayscale. If this is the case, change it to color mode. In PSE2 this is: Image>Mode>RGB Color. In PSE5 it might be a different path. The picture will still be B&W but you can now add color text, including black or white as you mentioned.

  • Facebook crashes Firefox when typing a comment by making "@" suggestions.

    This is the same problem as https://support.mozilla.org/en-US/questions/987650
    What the moderator, cor-el, did not understand and the poster could not seem to explain is that it is not Firefox's autofill that is the cause of the problem. So, clearing the forms history will not fix this issue.
    It is Firefox's reaction to Facebook's attempt to present a dropdown list of friend and page suggestions for addition to your comment the same way it would if you typed "@" first. FB's attempt to make things simpler for it's users by doing this without the "@" symbol seems to be causing a conflict in Firefox that totally freezes the browser. "Mozilla Firefox (Not responding)" is displayed and no amount of waiting changes things. No option for a crash report or anything but to close it.
    It happens randomly when typing in a comment or status, usually after 2 or 3 letters into a word that matches the first 2 or 3 letters of someone in your friends list or liked/followed pages/groups or even other commentators. Unfortunately, for me, that means even typing "the" can cause this issue. As far as I can tell, there is no way to turn this off in FB's settings.
    I understand that this is caused by Facebooks implementation of the feature, but it is my hope that someone at Mozilla can offer a fix or patch for this since it's unclear how many FF users are affected and it may take some time before FB addresses the issue.
    Please help. I would really prefer to not have to type my comments in Notepad before pasting them on FB.
    Thanks.

    Update, the fix is now on all the pre-release channels, and first indications are that it is resolving facebook issues where it hangs when searching.

  • When printing a highlighted (selected) print range from an internet item pulled up through Firefox, the first line of the selected range is not printing or is partially cut off.

    When printing a highlighted (selected) print range from an internet item pulled up through Firefox, the first line of the selected range is not printing or is partially cut off. This is not an issue with my printer, as printer prints the whole selected print range when using Internet Explorer or Word Doc applications. The problem only happens when using Firefox. Please advise on how to fix this. Is this a settings issue or do I need to download and update? Thx

    * [[Printing a web page]]
    * [[Firefox prints incorrectly]]
    Check and tell if its working.

  • Why does my cursor not automatically select the entire word when I try to select text by starting/ending in the middle of a word?

    In any other browser I've used (or word processor, for that matter) when I select text using my mouse cursor, if I start and/or end in the middle of a word, it automatically selects the whole word when I'm selecting more than one word. But for some reason this is not happening in Firefox. If I try to select say 3 words, and I start in the middle of the first word and end in the middle of the last word, it will only select those parts, not all 3 words entirely.

    Firefox allows to select part of a word. You can select a word with a double click and use Shift + left click to set the end of the selection, so you need to click at the end of the last word instead of in it.

  • Lightroom 4.4 keeps crashing saying "Lightroom encountered an error when reading from its preview cache and needs to quit" please help. I've tried reinstalling it and everything  Windows 8.1

    Lightroom 4.4 keeps crashing saying "Lightroom encountered an error when reading from its preview cache and needs to quit" please help. I've tried reinstalling it and everything  Windows 8.1

    I assume you know where your catalogue file (the lrcat file) is located. In the same folder is a previews lrdata folder which you should delete or rename in Explorer, then start LR again.
    If I've made incorrect assumptions above, sorry, and we'll go back over it from the start.
    John

  • I have a new MacBook ProI have a new MacBook Pro. When I try to edit a Word document in any way I get a screen that says Word has encountered a problem and needs to close; that I may lose the info. I was working on and I can't recover my work. Help?

    After decades, I finally gave up on Microsoft and bought a MacBook Pro. However, for work, I still have to use Microsoft. When I try to edit a Word Document in any way a screen pops up saying Microsoft Word has encountered a problem and needs to close; gives me an option to recover my work and restart Word; when I click that option Word restarts but I alway lose my work. This just started; before it was working fine. Help?

    This is a Microsoft problem. Contact them for assistance: http://support.microsoft.com/kb/295539
    mitch86 wrote:
    ... However, for work, I still have to use Microsoft.
    Are you certain about that? There are many alternatives to Office today. Consider
    LibreOffice (donation-supported)
    NeoOffice ($10 but older version is free)
    OpenOffice (completely free)
    In addition to the above I also recommend Apple's Pages ($19.99). All of these options allow you to open, edit, and save Word-formatted documents and spreadsheets. I use OpenOffice and Pages and have been completely Microsoft - free for over a year now. Life is better without Microsoft.

  • I just paid for Adobe PDF pack and I think I am having problems installing. When I select to print from word, PDF is not an option. Help!

    I just paid for Adobe PDF pack and I think I am having problems installing. When I select to print from word, PDF is not an option. Help!

    Hi voltric2014,
    If you are on Windows, you can download and install the CreatePDF Desktop Printer, which would allow you to "print" to PDF from Word. You'll find a link to the installer on the CreatePDF page at https://cloud.acrobat.com. Here are the instructions for installing it: Using Adobe PDF Pack
    Please let us know if you have additional questions.
    Best,
    Sara

  • Multiple selection ranges reversed when I append on storyline

    When I append multiple selection ranges in a clip to the storyline, the order is reversed on the storyline.  I've found others with similar issues and no solution aside from deleting FCP preferences in the library and/or reinstalling, both of which i've done to no avail.  It is excruciating and doesn't seem to make much sense as to why a shortcut would have been created only to force me to rearrange the clips on the storyline and waste the time that's supposed to be saved. I've also tried it on another computer, and the same issue.  Supposedly the clips are arranged in the order of the selections but they are always placed in the reverse order in which I select them.  I am trying my best to become accusomted to FCPX after switching to Premiere CS6 by default upon FCPX's release but so far seems to be a waste of a purchase.... 
    Anthony

    Thank you for your response and attempt to reproduce this issue, i've since pinpointed that I only have the issue when I attempt to append multiple selections I have made in list view in the event browser.  Whenever I append these multiple selections in list view, they will always be in the reverse order that my selections were made, but discovered these workarounds:
    1) after making the multiple selections in list view, switch views to filmstrip view and then append
    2) once the selections are made in list view, press F to rate them, and then select the subclips and append them to the storyline
    That is the only way I can get them to appear in the order I intended.  I have found users to be polarized on this issue, having found only a few editors on other forums with this issue and finding most who seem like my issue is a freak occurance (even got the great Larry Jordan to respond on his forum and not being able to replicate the issue).  So i'm hoping an upgrade will fix the problem in the near future.  I've tried deleting preference files however did not uninstall and reinstall on one of my machines since I already tried doing so on another machine to no avail...
    Thanks anyways for the response!
    Ant

  • My computer(A toshiba) crashed and when I bought a new computer(a Mac), my previous apple ID does not word and I was only able to get songs that I bought in 2004. I am unable to authorize my account to get to songs that I purchased recently. Please help.

    My computer(A toshiba) crashed and when I bought a new computer(a Mac), my previous apple ID does not word and I was only able to get songs that I bought in 2004. I am unable to authorize my account to get to songs that I purchased recently. Please help.

    Steve Taylor1 wrote:
    If you have exceeded your allowance of 5 machines then Apple will not allow you to authorise additional Computers. If you still have access to your old toshiba fire it up de-authorise it and then try again with the new computer.
    While this won't help if you are having password problems, I did want to point out that you do not need to access old machines to de-authorize them. Once you are signed in at the iTunes store, access "my account" by clicking on your username in the top navigation bar. Then "manage devices".  You can remove any old machines that way.

  • Using OS X 10.6.8 on my IMac, I find that items on my message list no longer "fade" from dark to light when I click on them. I recently switched the font from Arial to Helvetica to permit me to select italics for any word. I am composing in rich text.

    Using OS X 10.6.8 on my IMac, I find that items on my message list no longer "fade" from dark to light when I click on them. I recently switched the font from Arial to Helvetica to permit me to select italics for any word. I am composing in rich text.

    Not sure why it would default to IMAP?  But any how, start the account anew, fill in the first page of info, but before clicking on the Create button, hold down the Option key until the Create button changes to read Continue.  Click continue, and proceed in a more manual process during which you can set the account type as POP.
    Ernie

  • Crash occurs when selecting print,pdf as well?

    Any ideas as to why crashes occurs when I hit print from file or from a pdf print symbol?
    All was working okay last week.

    Do you have a local Apple Store or somebody locally that can assist you with this system?
    Your Mac is easily old enough to be encountering hardware problems with your disks.  Old disks can and do fail, and your Mac is probably at least eight years old; more than old enough to be seeing disk failures.  I'd get a backup or two of your disk made onto external disks, and then look to upgrade and patch as described in this reply and in the earlier reply.  Preserve your data.  That disk-to-disk backup can be created with Disk Utility, or with whatever backup tool(s) you're using.
    Once you have your external backup(s), Disk Utility has a repair function, which becomes available once you verify the disk.  If the online disk repair can't complete the repairs, then Disk Utility will tell you that you that you need to shut down and boot your installer DVD and use the version of Disk Utility available from the installer's Utilities menu; that's the second screen of the installer, IIRC.  (It's been several years since I've run 10.4, so I'm not entirely certain about that.  You do NOT want to commence the software installation that's available with that DVD.  That would be bad.)
    After the repair, use Software Update ( > Software Update...) and upgrade to OS X 10.4.11; to the most current 10.4 version.  That might resolve this, if it's an isolated corruption.  (If the disk is failing, well, the disk is failing.)
    As a guess, you're probably also headed toward needing some local help, and a hardware swap or hardware upgrade, too.
    OS X 10.4 is also known as Tiger and the OS X 10.4.1 release is almost eight years old, and that particular OS X version also means your Mac system is based on a PPC processor and not on an Intel processor. 
    PPC-based hardware cannot be upgraded past version 10.5; past Leopard.  Snow Leopard 10.6 does not support PPC systems.

  • Crashes consistently when control clicking a selected object

    CS4 InDesign crashes consistently when control clicking a selected object. Preferences have been reloaded, the program has been reinstalled, all without any effect towards this issue. Any suggestions?

    Yeah, it was InDesign Hangs when right clicking on graphic.
    There was a lot of head-scratching and the rather unsatisfying conclusion was when the OP removed ancient applications that might have been a choice for "Edit Original," then the problem went away.
    I guess the conclusion is that right-clicking on an image iterates over the possible apps that can open an image (for Edit With and Edit Original) and does [something], and for some reason that [something] was hanging. Not clear what the app was. But presumably if you right click the file in the Finder and look at the list provided by Open With, it is similar.
    Or you could try the suggestions I offered to the OP in that thread that it looks like he never used.

  • HT5576 When I go to the password and security, there is no Select "Start" under the words "two-step verification" and follow the instructions on the screen

    When I go to the password and security, there is no Select "Start" under the words "two-step verification" and follow the instructions on the screen

    Hey Podducbnov,
    Thanks for the question. It sounds like you are trying to setup Two-Step Verification. After logging into http://appleid.apple.com, click "Password & Security". At this time you will probably be prompted to answer your security questions, go ahead and do so. Afterwards, the top section has a "Get started…" link to setup Two-Step Verification:
    Apple ID: Frequently asked questions about two-step verification for Apple ID
    http://support.apple.com/kb/HT5570
    Thanks,
    Matt M.

Maybe you are looking for

  • G_SET_TREE_GENERATE Appending items to hierarchy

    Hello, I'm searching for a way to append some items to an existing hierarchy in controlling. Using G_SET_TREE_GENERATE will delete all existing items in the hierarchy I want to update, whereas I want to add something. If it's an unknown leaf it shoul

  • Remote Control and MediaSourc

    I hava an Audigy 2 ZS Platinum Pro. I formated my HD last night and reinstalled XP. I then installed the new drivers and Media Source 5 and new DTS Neo plugin. But when I tried to install the old Remote Control plugin, it didn't work, it said I don't

  • ABAP objects for transfer/update rules - does this apply to include stateme

    I have a question about the new requirement for the code in the update/transfer rules to be written in ABAP Objects standards.  Does this still apply if in your update rules you using include programs?  Does this mean that when we upgrade we will hav

  • Windows 2003 server loses security tab for folders created in OS X

    We have a centralised storage system that is running on a Windows 2003 cluster. This server has folders for each department so they can store colaborative work. They can create their own folders and files within their departments folder. When files a

  • BlackberryID

    Can somebody please help me recover my blackberryID ... Out of my stupidity I have forgotten the password and the answer to the security question for my blackberryID... How do I get it back??? Solved! Go to Solution.