创建发送电子邮件的 Infopath 表单
我试图将最终用户在 InfopathForm 的文本字段(文本字段、多行、段落分隔符和滚动条,如果需要)中编写的文本包含在发送给相关部门的电子邮件中。
我总是收到此错误“名称‘remarkmain’在当前上下文中不存在”
这些是我用来定义并包含在邮件中的代码的某些部分:
string remarkmain = xnMyForm.SelectSingleNode("/my:myFields/my:field104", ns).Value;
string BodyAcc = "New Internal Employee " + Titlee + " " + fullname + ".\n Employee is joining " + Comp + " as of " + HireDate + ".\n\n Please view the general information below:\n " + bodyHD + "\n" + bodyED + "\n" + bodyDOB + "\n" + bodytitle + "\n" + bodylast + "\n" + bodyname + "\n" + bodyLang + "\n" + bodyComp + "\n" + bodydep + "\n" + bodyPos + "\n" + Bankacc + "\n" + add + "\n" + CostCtreVZW + "\n" + CostCtreCVBA + "\n\nWork Schedule\n" + WorkMon + "\n" + WorkTue + "\n" + WorkWed + "\n" + WorkThurs + "\n" + WorkFri + "\n" + WorkFDSch + "\n\n" + ContractN + "\n" + EmpN + "\n" + MGR + "\n" + Teamlead +"\n\n" **+ remarkmain** + "\n\n";
我是 c# 新手,我在 Infopath 中创建此表单(2007)
I am trying to include the text written by enduser in a textfield in an InfopathForm (textfield,multiline,paragraphbreaks and scroll bar if necessary) in an email to the relevant Department.
I always get this error "The name 'remarkmain' does not exist in the current context"
these are some parts of the code i used to define and include in mail:
string remarkmain = xnMyForm.SelectSingleNode("/my:myFields/my:field104", ns).Value;
string BodyAcc = "New Internal Employee " + Titlee + " " + fullname + ".\n Employee is joining " + Comp + " as of " + HireDate + ".\n\n Please view the general information below:\n " + bodyHD + "\n" + bodyED + "\n" + bodyDOB + "\n" + bodytitle + "\n" + bodylast + "\n" + bodyname + "\n" + bodyLang + "\n" + bodyComp + "\n" + bodydep + "\n" + bodyPos + "\n" + Bankacc + "\n" + add + "\n" + CostCtreVZW + "\n" + CostCtreCVBA + "\n\nWork Schedule\n" + WorkMon + "\n" + WorkTue + "\n" + WorkWed + "\n" + WorkThurs + "\n" + WorkFri + "\n" + WorkFDSch + "\n\n" + ContractN + "\n" + EmpN + "\n" + MGR + "\n" + Teamlead +"\n\n" **+ remarkmain** + "\n\n";
I am new to c# and this form i m creating in Infopath ( 2007 )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否考虑过将某些值提交到表单库并通过 sharepoint 设计器使用 sharepoint 工作流程来发送邮件?共享点工作流程变量选择和通用界面通常是广阔而令人愉快的,并且功能广泛。
Have you considered submitting certain values to a form library and using sharepoint workflows via sharepoint designer to send the mail? The sharepoint workflow variable selection and general interface is generally expansive and pleasant and the functionality is extensive.
确保
strign BodyAcc="New Internal Employee+....remarkmain+....;
位于remarkmain
范围内如果字符串连接过多,请使用 StringBuilder
See to that
strign BodyAcc="New Internal Employee+....remarkmain+....;
is inremarkmain
scopeUse StringBuilder if you have too many string concatinations