每个...需要下一个帮助

每个...需要下一个帮助

问题描述:

对于每个变体在ThisDocument中

[陈述]

下一个变体


以上代码我需要VBA扫描所有文件并找到每个 ''但是thisdocument什么都不工作整个故事有人有什么建议吗?


欢呼Blacbox

For Each variant In ThisDocument
[statements]
Next variant

for the above code i need VBA to scan all of the document and find each " '' " but "thisdocument" doesn''t work neither does "wholestory" anyone got any suggestions?

cheers Blacbox


For Each变种In ThisDocument

[陈述]

下一个变体


上面的代码我需要VBA扫描所有文件和找到每个 ''但是thisdocument什么都不工作整个故事有人有什么建议吗?


欢呼Blacbox
For Each variant In ThisDocument
[statements]
Next variant

for the above code i need VBA to scan all of the document and find each " '' " but "thisdocument" doesn''t work neither does "wholestory" anyone got any suggestions?

cheers Blacbox



也许你可以使用InStr(ThisDocument,"''" ;)

Hi, perhaps you could use InStr(ThisDocument, " '' ")



您好,也许您可​​以使用InStr(ThisDocument,"''")
Hi, perhaps you could use InStr(ThisDocument, " '' ")



鉴于For Each ...声明的性质,我认为这将是 Instr( variant ,"''")

Given the nature of the For Each... statement, I think that would be Instr(variant, " '' ").


谢谢,但是当我使用


x = InStr(1,ThisDocument,"''")

>
首先,如果我遗漏了它所需的1本文件作为开始,其次instr返回值0为什么?文中肯定有'。


有什么建议吗? cheeers


blackbox
thanks but when i use

x = InStr(1, ThisDocument, "''")

firstly if i leave out the 1 it takes "this document" as the start and secondly instr returns a value of 0 why? there definitely are '' in the text.

any suggestions? cheeers

blackbox