急! 麻烦帮忙看看怎么样循环取10308开头的 ,解析功能编号、功能名称、功能类型。功能入参下面是的表格

szwm1010 2017-11-28 08:01:35
功能编号:10308001
功能名称:股东查询
功能类型:查询功能
功能入参:
列名 列代码 列类型 必输 FIX域 说明
资产账户 CUACCT_CODE BIGINT √ 8920
交易板块 STKBD VARCHAR(32) X 625
交易账户 TRDACCT VARCHAR(20) X 448
[/b]


Sub 宏_输出Proto文件()
Dim funcId As String
Dim funcName As String
Dim inlineArray(100) As String
Dim retValue As Long
Dim bIsGenrate As Boolean
Dim fileName As String
Dim rowInput As Integer


Selection.GoTo What:=wdGoToSection, Which:=wdGoToFirst

' 金证微架构宏_输出Proto文件 宏
Selection.Find.Forward = True
Selection.Find.ClearFormatting
Selection.Find.MatchWholeWord = False
Selection.Find.MatchCase = False
Selection.Find.Wrap = wdFindStop
Selection.Find.Execute FindText:="功能编号:10308"
Do While Selection.Find.Found = True
Char = Selection.EndOf(Unit:=wdWord, Extend:=wdExtend)
funcId = delete_vbcrlf(Selection.Text)
funcId = Mid(funcId, Len(funcId) - 7, 8)

-- 需要循环找文档中10308开头的功能号,解析功能功能编号、功能名称。 现在功能名称找不到
Selection.Find.Execute FindText:="功能编号:"
Selection.Find.Forward = True
If Selection.Find.Found = True Then
Char = Selection.EndOf(Unit:=wdWord, Extend:=wdExtend)
funcName = delete_vbcrlf(Selection.Text)
funcName = Mid(funcId, Len(funcId) - 7, 8)
End If



Char = Selection.EndOf(Unit:=wdWord, Extend:=wdMove)
Selection.Find.Execute FindText:="功能编号:10308"
Loop
...全文
276 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
脆皮大雪糕 2017-11-29
  • 打赏
  • 举报
回复
建议把数据样例拿几条出来看看。 另外,个人没看懂你问题的描述。猜测Vlookup 函数就已经能解决你的问题,用不着宏

2,461

社区成员

发帖
与我相关
我的任务
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
  • VBA
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧